Documentation
¶
Overview ¶
Package postgres runs golang-migrate migrations against a Postgres database.
This package intentionally lives outside hex/db so consumers who use a different dialect never link the Postgres migration driver. Import it only when you need Postgres migrations.
The SQL driver itself (e.g. github.com/lib/pq or github.com/jackc/pgx) is still the caller's responsibility to blank-import.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrate ¶
Migrate applies all pending Up migrations from the embedded FS. Returns nil if there are no changes.
The caller retains ownership of sqldb; this function never closes it (even though golang-migrate's Migrate.Close would). The iofs source has no external resources to release, so no cleanup is required.
func MigrateDown ¶
MigrateDown rolls back every applied migration. sqldb is not closed.
Types ¶
This section is empty.