Documentation
¶
Index ¶
- func MigrateDown(db *sql.DB, steps int, logger kitlog.Logger) error
- func MigrateDownAll(db *sql.DB, logger kitlog.Logger) error
- func MigrateUp(db *sql.DB, logger kitlog.Logger) error
- func NewMigration(dirName, migrationName string, logger kitlog.Logger) error
- func Open(connStr string) (*sqlx.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateDown ¶
MigrateDown attempts to run down migrations against Postgres. It takes as parameters an sql.DB instance, the number of steps to run, and a logger instance. Migrations are loaded from a bindata generated module that is compiled into the binary.
func MigrateDownAll ¶
MigrateDownAll attempts to run all down migrations against Postgres. It takes as parameters an sql.DB instance, and a logger instance. Migrations are loaded from a bindata generated module that is compiled into the binary.
func MigrateUp ¶
MigrateUp attempts to run all up migrations against Postgres. Migrations are loaded from a bindata generated module that is compiled into the binary. It takes as parameters an sql.DB instance, and a logger instance.
func NewMigration ¶
NewMigration creates a new pair of files into which an SQL migration should be written. All this is doing is ensuring files created are correctly named.
Types ¶
This section is empty.