Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Migration ¶
type Migration struct {
Name string
Function MigrationFunctionType
}
Migration model
type MigrationFunctionType ¶
MigrationFunctionType is func that is called to run the migration for a table
type Sample ¶
type Sample struct {
// Model
ID uint `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt mysql.NullTime
}
Sample table structure
type SchemaMigration ¶
type SchemaMigration struct {
MigrationName string `sql:"unique_index"`
CreatedAt time.Time `sql:"DEFAULT:current_timestamp"`
}
SchemaMigration used to see which migrations have run by storing those that have run
Click to show internal directories.
Click to hide internal directories.