Versions in this module Expand all Collapse all v1 v1.1.0 Nov 7, 2026 v1.0.0 Nov 7, 2026 Changes in this version + const DefaultLedgerTable + const StatusFailed + const StatusRolledBack + const StatusRunning + const StatusSuccess + func Create(dir, name string) (up, down string, err error) + func DialectNames() []string + type Applied struct + AppliedAt time.Time + Down string + Name string + Status string + Up string + Version string + type Dialect interface + Driver func() string + LedgerDDL func(table string) []string + Lock func(ctx context.Context, conn *sql.Conn) (release func(context.Context), err error) + Name func() string + Placeholder func(n int) string + QuoteIdent func(s string) string + TransactionalDDL func() bool + func DialectFor(name string) (Dialect, error) + type DownOptions struct + DryRun bool + Steps int + type File struct + Down string + DownPath string + Name string + Up string + UpPath string + Version string + func Load(dir string) ([]File, error) + type Migrator struct + Out func(format string, args ...any) + func Open(ctx context.Context, opt Options) (*Migrator, error) + func (m *Migrator) Close() error + func (m *Migrator) Dialect() Dialect + func (m *Migrator) Down(ctx context.Context, opt DownOptions) (int, error) + func (m *Migrator) Status(ctx context.Context) ([]Status, error) + func (m *Migrator) Up(ctx context.Context, opt UpOptions) (int, error) + type Options struct + DSN string + Dialect string + Dir string + LedgerTable string + Name string + NoLock bool + type Status struct + Applied bool + AppliedAt time.Time + Drifted bool + Missing bool + Name string + StatusText string + Version string + type UpOptions struct + AllowDrift bool + DryRun bool + To string