Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations = []*gormigrate.Migration{ &V202005031209CreateUserTable, }
Migrations List of migrations to do on startup
View Source
var V202005031209CreateUserTable = gormigrate.Migration{ ID: "202005031209", Migrate: CreateTableMigration( &userV202005031209{}, &rememberMeV202005031308{}, ), Rollback: func(tx *gorm.DB) error { DropForeignKeys(tx, &userV202005031209{}, &rememberMeV202005031308{}, ) if tx.Error != nil { return tx.Error } return tx.DropTableIfExists( &userV202005031209{}, &rememberMeV202005031308{}, ).Error }, }
Functions ¶
func AddForeignKeys ¶
AddForeignKeys must be called on tables to define forein key settings
func CreateTableMigration ¶
func DropForeignKeys ¶
DropForeignKeys must be called on rollbacks when AddForeignKeys is called
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.