Versions in this module Expand all Collapse all v0 v0.1.1 Aug 7, 2026 v0.1.0 Aug 7, 2026 Changes in this version + var ErrAlreadyRecorded = migrator.ErrAlreadyRecorded + var ErrBaselineNotFound = migrator.ErrBaselineNotFound + var ErrDivergence = migrator.ErrDivergence + var ErrEmptySource = migrator.ErrEmptySource + var ErrFailedMigrations = migrator.ErrFailedMigrations + var ErrInterleaved = migrator.ErrInterleaved + var ErrIrreversible = migrator.ErrIrreversible + var ErrLockTimeout = db.ErrLockTimeout + var ErrPoolTooSmall = db.ErrPoolTooSmall + var ErrUnrecorded = migrator.ErrUnrecorded + func Forget(ctx context.Context, sqlDB *sql.DB, id string, opts ...Option) error + type Analysis struct + Blocked bool + BlockedReason string + Interleaved []string + ToApply []string + ToRollback []string + func Plan(ctx context.Context, sqlDB *sql.DB, fsys fs.FS, opts ...Option) (*Analysis, error) + type AppliedMigration struct + AppliedAt time.Time + DownScript string + Error string + Failed bool + ID string + func Status(ctx context.Context, sqlDB *sql.DB, opts ...Option) ([]AppliedMigration, error) + type Option func(*config) + func WithAllowEmptySource() Option + func WithInterleaved() Option + func WithLockID(id int64) Option + func WithLockTimeout(d time.Duration) Option + func WithLogger(logger *slog.Logger) Option + func WithRollback() Option + func WithSchema(schema string) Option + func WithTableName(name string) Option + type Result struct + Applied []string + ExtrasLeft []string + Interleaved []string + RolledBack []string + func Baseline(ctx context.Context, sqlDB *sql.DB, fsys fs.FS, throughID string, ...) (*Result, error) + func Down(ctx context.Context, sqlDB *sql.DB, count int, opts ...Option) (*Result, error) + func DownAll(ctx context.Context, sqlDB *sql.DB, opts ...Option) (*Result, error) + func Reconcile(ctx context.Context, sqlDB *sql.DB, fsys fs.FS, opts ...Option) (*Result, error) + func Up(ctx context.Context, sqlDB *sql.DB, fsys fs.FS, opts ...Option) (*Result, error)