gomigrator

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoCreate

func DoCreate(configuration config.Config, args ...string) error

func DoDbversion

func DoDbversion(config config.Config, _ ...string) error

func DoDown

func DoDown(config config.Config, _ ...string) error

func DoRedo

func DoRedo(config config.Config, _ ...string) error

func DoStatus

func DoStatus(config config.Config, _ ...string) error

func DoUp

func DoUp(cfg config.Config, _ ...string) error

func Register

func Register(name string, up func(Tx *sql.Tx) error, down func(Tx *sql.Tx) error) error

Types

type MigrationStatusRec

type MigrationStatusRec struct {
	ID      int
	Name    string
	Type    string
	Status  string
	LastRun time.Time
	Applied bool
}

func Status

func Status(config config.Config) (status []MigrationStatusRec, err error)

type VersionInfo

type VersionInfo struct {
	Version       int
	MigrationName string
}

func DBVersion

func DBVersion(config config.Config) (version VersionInfo, err error)

Jump to

Keyboard shortcuts

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