Versions in this module Expand all Collapse all v0 v0.1.1 Feb 22, 2026 v0.1.0 Feb 22, 2026 Changes in this version + func DiffSchemas(oldDDL, newDDL string) (upSQL string, downSQL string) + type AppliedMigration struct + AppliedAt time.Time + Checksum string + SchemaName string + Version int + type ColumnDef struct + Definition string + Name string + type DistributedLock interface + Acquire func(ctx context.Context, key string) (release func(), err error) + type MigrationRunner struct + func NewMigrationRunner(store MigrationStore, locker DistributedLock, logger *slog.Logger) *MigrationRunner + func (r *MigrationRunner) Pending(ctx context.Context, providers ...SchemaProvider) ([]PendingMigration, error) + func (r *MigrationRunner) Run(ctx context.Context, db *sql.DB, providers ...SchemaProvider) error + func (r *MigrationRunner) Status(ctx context.Context, providers ...SchemaProvider) (map[string][]AppliedMigration, error) + type MigrationStore interface + Applied func(ctx context.Context, schemaName string) ([]AppliedMigration, error) + Record func(ctx context.Context, schemaName string, version int, checksum string) error + type PendingMigration struct + FromVersion int + SchemaName string + ToVersion int + UpSQL string + type PostgresLock struct + func NewPostgresLock(db *sql.DB) *PostgresLock + func (l *PostgresLock) Acquire(ctx context.Context, key string) (func(), error) + type SQLiteLock struct + func NewSQLiteLock(_ *sql.DB) *SQLiteLock + func (l *SQLiteLock) Acquire(ctx context.Context, _ string) (func(), error) + type SQLiteMigrationStore struct + func NewSQLiteMigrationStore(db *sql.DB) (*SQLiteMigrationStore, error) + func (s *SQLiteMigrationStore) Applied(ctx context.Context, schemaName string) ([]AppliedMigration, error) + func (s *SQLiteMigrationStore) Record(ctx context.Context, schemaName string, version int, checksum string) error + type SchemaDiff struct + DownSQL string + FromVersion int + ToVersion int + UpSQL string + type SchemaProvider interface + SchemaDiffs func() []SchemaDiff + SchemaName func() string + SchemaSQL func() string + SchemaVersion func() int + type TableDef struct + Columns []ColumnDef + Indexes []string + Name string