Versions in this module Expand all Collapse all v0 v0.2.1 Sep 27, 2026 Changes in this version + var ErrDuplicateFile = errors.New("migrationx: duplicate migration file") + func Merge(sources ...fs.FS) (fs.FS, error) v0.2.0 Sep 27, 2026 Changes in this version type Migration + Dirty bool + Orphaned bool v0.1.0 Aug 14, 2026 Changes in this version + const DefaultLockTimeout + const DefaultTable + func Command(open func(ctx context.Context, allowOutOfOrder bool) (*Migrator, error)) *cli.Command + func Create(dir, name string) (string, string, error) + type Config struct + AllowOutOfOrder bool + Dialect Dialect + LockTimeout time.Duration + Log *slog.Logger + Table string + type Dialect int + const DialectMySQL + const DialectSQLite + type Migration struct + Applied bool + AppliedAt time.Time + Name string + OutOfOrder bool + Version int64 + type Migrator struct + func New(db *sql.DB, fsys fs.FS, cfg Config) (*Migrator, error) + func (m *Migrator) Down(ctx context.Context) error + func (m *Migrator) DownTo(ctx context.Context, version int64) error + func (m *Migrator) Status(ctx context.Context) ([]Migration, error) + func (m *Migrator) Up(ctx context.Context) error + func (m *Migrator) UpByOne(ctx context.Context) error + func (m *Migrator) UpTo(ctx context.Context, version int64) error + func (m *Migrator) Version(ctx context.Context) (int64, error)