Versions in this module Expand all Collapse all v0 v0.0.3 May 11, 2021 v0.0.2 May 11, 2021 Changes in this version + const MaxIndividualMigrationTime + var DefaultOptions = &Options + var ErrMigrationIDDoesNotExist = errors.New("gormigrate: Tried to migrate to an ID that doesn't exist") + var ErrMissingID = errors.New("gormigrate: Missing ID in migration") + var ErrNoMigrationDefined = errors.New("gormigrate: No migration defined") + var ErrNoRunMigration = errors.New("gormigrate: Could not find last run migration") + var ErrRollbackImpossible = errors.New("gormigrate: It's impossible to rollback this migration") + var ErrUnknownPastMigration = errors.New("gormigrate: Found migration in DB that does not exist in code") + var Migrations []*Migration + func Migrate(db *gorm.DB) error + func MigrateDown(db *gorm.DB) error + func MigrateDownFrom(db *gorm.DB, name string) error + func MigrateUp(db *gorm.DB, to string) error + func Rollback(db *gorm.DB, m *Migration) error + type DuplicatedIDError struct + ID string + func (e *DuplicatedIDError) Error() string + type Gormigrate struct + func New(db *gorm.DB, options *Options, migrations []*Migration) *Gormigrate + func (g *Gormigrate) Migrate() error + func (g *Gormigrate) MigrateTo(migrationID string) error + func (g *Gormigrate) RollbackLast() error + func (g *Gormigrate) RollbackMigration(migration *Migration) error + func (g *Gormigrate) RollbackTo(migrationID string) error + type InitSchemaFunc func(*gorm.DB) error + type MigrateFunc func(*gorm.DB) error + type Migration struct + DisableTransaction bool + ID string + Migrate MigrateFunc + Rollback RollbackFunc + type Options struct + IDColumnName string + IDColumnSize int + TableName string + ValidateUnknownMigrations bool + type ReservedIDError struct + ID string + func (e *ReservedIDError) Error() string + type RollbackFunc func(*gorm.DB) error