Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
Error records an error and the migration that caused it. Index is the index of Mig in the given list of migrations, or the index where it would have been if it's not in the list.
type Migration ¶
type Migration struct { Name string SQL string // unavailable for applied migrations Hash string // internally computed if unset RequiredSHA string OutsideTx bool }
Migration describes a PostgreSQL database migration. At least one of SQL and Hash must be set. If both are set, Hash must be the SHA-256 of SQL.
func FilterApplied ¶
FilterApplied returns the slice of ms containing all migrations in ms that haven't yet been applied.
func GetApplied ¶
GetApplied returns the list of currently-applied migrations.
Click to show internal directories.
Click to hide internal directories.