Documentation
¶
Index ¶
Constants ¶
View Source
const ( CreateVersionTableSQL = `` /* 173-byte string literal not displayed */ CreateHistoryTableSQL = `` /* 191-byte string literal not displayed */ )
Constants for the SQL statements to create the migration tables
Variables ¶
This section is empty.
Functions ¶
func InitializeTables ¶
InitializeTables creates the necessary migration tables if they don't exist
func RecordHistory ¶
RecordHistory records an entry in the migration history with the SQL content
Types ¶
type MigrationVersion ¶
MigrationVersion represents a record in the mig_versions table
func GetAppliedMigrations ¶
func GetAppliedMigrations(db *sql.DB) ([]MigrationVersion, error)
GetAppliedMigrations retrieves all applied migrations
Click to show internal directories.
Click to hide internal directories.