Versions in this module Expand all Collapse all v0 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + const TagPostUpgrade + const TagPreUpgrade + var Module = &bootstrap.Module + func DefaultGormConfigurerProvider() fx.Annotated + func Migrate(ctx context.Context, r *Registrar, v Versioner) error + func Use() + type AppliedMigration interface + GetDescription func() string + GetInstalledOn func() time.Time + GetVersion func() Version + IsSuccess func() bool + type GormVersioner struct + func (v *GormVersioner) CreateVersionTableIfNotExist(ctx context.Context) error + func (v *GormVersioner) GetAppliedMigrations(ctx context.Context) ([]AppliedMigration, error) + func (v *GormVersioner) RecordAppliedMigration(ctx context.Context, version Version, description string, success bool, ...) error + type Migration struct + Description string + Func MigrationFunc + Tags utils.StringSet + Version Version + func WithVersion(version string) *Migration + func (m *Migration) Dot(i int) *Migration + func (m *Migration) WithDesc(d string) *Migration + func (m *Migration) WithFile(fs fs.FS, filePath string, db *gorm.DB) *Migration + func (m *Migration) WithFunc(f MigrationFunc) *Migration + func (m *Migration) WithTag(tags ...string) *Migration + type MigrationFunc func(ctx context.Context) error + type MigrationVersion struct + Description string + ExecutionTime time.Duration + InstalledOn time.Time + Success bool + Version Version + func (v MigrationVersion) GetDescription() string + func (v MigrationVersion) GetInstalledOn() time.Time + func (v MigrationVersion) GetVersion() Version + func (v MigrationVersion) IsSuccess() bool + type Registrar struct + func NewRegistrar() *Registrar + func (r *Registrar) AddMigrations(m ...*Migration) + type Version []int + func (v *Version) Scan(src interface{}) error + func (v Version) Equals(o Version) bool + func (v Version) GormDataType() string + func (v Version) Lt(other Version) bool + func (v Version) String() string + func (v Version) Value() (driver.Value, error) + type Versioner interface + CreateVersionTableIfNotExist func(ctx context.Context) error + GetAppliedMigrations func(ctx context.Context) ([]AppliedMigration, error) + RecordAppliedMigration func(ctx context.Context, version Version, description string, success bool, ...) error + func NewGormVersioner(db *gorm.DB) Versioner