Steps before executing the migration

Report a typo

Suppose you want to use the AutoMigrate() function from GORM to create a new database schema from scratch.

What is the correct order of steps you should follow before executing the first migration? Put the first step on top and the last step at the bottom.

Put the items in the correct order
Run the db.AutoMigrate() function and pass to it pointers to Model structs as arguments
Use gorm.Open() to connect to the database
Declare all the Model structs of the database schema
___

Create a free account to access the full topic