Versions in this module Expand all Collapse all v0 v0.1.0 Jan 17, 2026 Changes in this version + var ErrLockTimeout = errors.New("migration lock timeout") + type AdvisoryLocker struct + ID int64 + PollInterval time.Duration + Timeout time.Duration + func (a AdvisoryLocker) Lock(ctx context.Context, db *sql.DB) error + func (a AdvisoryLocker) Unlock(ctx context.Context, db *sql.DB) error + type Locker interface + Lock func(context.Context, *sql.DB) error + Unlock func(context.Context, *sql.DB) error + type Migration struct + DownPath string + Name string + UpPath string + Version int + func List(dir string) ([]Migration, error) + type PlanEntry struct + Applied bool + type Runner struct + DB *sql.DB + Dir string + Locker Locker + Table string + func New(db *sql.DB, dir string) *Runner + func (r *Runner) Down(ctx context.Context, steps int) (int, error) + func (r *Runner) Plan(ctx context.Context) ([]PlanEntry, error) + func (r *Runner) Up(ctx context.Context) (int, error)