Documentation ¶
Index ¶
- func Bootstrap(db *gorm.DB) error
- func Migrate(db *gorm.DB, migrations []MigrationStage) error
- func MigrateAll(db *gorm.DB, migrationFunctions []func(*gorm.DB) error)
- func MigrationExists(db *gorm.DB, migrationName string) bool
- func SaveMigration(db *gorm.DB, migrationName string) error
- type Migration
- type MigrationStage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bootstrap ¶
Bootstrap creates "migrations" table to keep track of already run database migrations
func MigrateAll ¶
MigrateAll runs bootstrap, then all migration functions listed against the specified database and logs any errors
func MigrationExists ¶
MigrationExists checks if the migration called migrationName has been run already
Types ¶
Click to show internal directories.
Click to hide internal directories.