migrations

package
v0.0.0-...-fb49ba0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 5 Imported by: 0

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

type LoggerFunc func(format string, v ...any)

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.

func (LoggerFunc) Verbose

func (l LoggerFunc) Verbose() bool

Verbose implements migrate.Logger.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL