package infra import "time" // Migration represents a migration parsed from a .sql file. type Migration struct { Version int // sequential number (1, 2, 3...) Name string // descriptive name (create_entities, add_status_column) UpSQL string // SQL block to apply the migration DownSQL string // SQL block to revert the migration AppliedAt time.Time // zero value if not yet applied } // MigrationStatus represents the state of a migration relative to a database. type MigrationStatus struct { Version int // sequential number Name string // descriptive name Applied bool // true if already applied in the database AppliedAt time.Time // when it was applied (zero value if pending) }