Versions in this module Expand all Collapse all v0 v0.1.0 Mar 30, 2026 Changes in this version + const DefaultTableName + var ErrDuplicateMigrationID = errors.New("migrate: duplicate migration id") + var ErrEmptyMigrationID = errors.New("migrate: migration id is required") + var ErrNilMigrationUp = errors.New("migrate: migration up function is required") + type ApplyResult struct + AppliedIDs []string + func ApplyPending(ctx context.Context, db *sql.DB, migrations []Migration) (ApplyResult, error) + type Executor interface + ExecContext func(context.Context, string, ...any) (sql.Result, error) + type Migration struct + Down Operation + ID string + NonTransactional bool + Up Operation + type Operation func(context.Context, Executor) error + type Runner struct + func NewRunner(tableName string) *Runner + func (r *Runner) ApplyPending(ctx context.Context, db *sql.DB, migrations []Migration) (ApplyResult, error)