Documentation ¶
Overview ¶
Package migrations performs database migrations embedded in the binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Down ¶
func Down(connStr string, logger LoggerFunc) error
Down brings the database down by applying the down migrations.
func Reset ¶
func Reset(connStr string, logger LoggerFunc) error
Reset resets the database by bringing the database down, then up again.
func Up ¶
func Up(connStr string, logger LoggerFunc) error
Up brings the database up to date to the latest migration.
Types ¶
type LoggerFunc ¶
LoggerFunc is a function that will be called with migration logging.
func (LoggerFunc) Printf ¶
func (l LoggerFunc) Printf(format string, v ...any)
Printf implements migrate.Logger.
Click to show internal directories.
Click to hide internal directories.