Versions in this module Expand all Collapse all v0 v0.1.0 Mar 30, 2026 Changes in this version + func ApplySQLMigrations(ctx context.Context, db *sql.DB, dialectName, tableName string, ...) (migrate.ApplyResult, error) + func MarshalSnapshot(snapshot Snapshot) ([]byte, error) + func SplitSQLStatements(sqlText string) ([]string, error) + type ColumnSnapshot struct + AutoIncrement bool + DefaultSQL string + DefinitionSQL string + HasDefault bool + Name string + Nullable bool + PrimaryKey bool + Type schema.ColumnType + Unique bool + type ConstraintSnapshot struct + Name string + SQL string + Type string + type DiskMigration struct + DirPath string + ID string + Name string + SQL string + SQLPath string + Snapshot Snapshot + SnapshotPath string + func LoadDiskMigrations(dir string) ([]DiskMigration, error) + func WriteMigrationFiles(dir, name string, plan Plan, snapshot Snapshot, now time.Time) (DiskMigration, error) + type ForeignKeySnapshot struct + Name string + SQL string + type IndexSnapshot struct + Name string + SQL string + type Plan struct + Statements []string + func DiffSnapshots(previous *Snapshot, current Snapshot) (Plan, error) + func (p Plan) Empty() bool + type Registry func() []schema.TableReference + type Snapshot struct + Dialect string + Tables []TableSnapshot + Version int + func BuildSnapshot(dialectName string, tables []schema.TableReference) (Snapshot, error) + func ReadLatestSnapshotFromMigrations(dir string) (*Snapshot, error) + func UnmarshalSnapshot(data []byte) (Snapshot, error) + type TableSnapshot struct + Columns []ColumnSnapshot + Constraints []ConstraintSnapshot + CreateTableSQL string + ForeignKeys []ForeignKeySnapshot + Indexes []IndexSnapshot + Name string