migrations

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Collection = migrations.NewCollection()
)

Functions

func DiscoverSQLMigrations

func DiscoverSQLMigrations(dir string) error

DiscoverSQLMigrations scans dir for migrations.

func Run

func Run(db migrations.DB, a ...string) (int64, int64, error)

Run runs command on the db. Supported commands are: - up [target] - runs all available migrations by default or up to target one if argument is provided. - down - reverts last migration. - reset - reverts all migrations. - version - prints current db version. - set_version - sets db version without running migrations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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