migrations

package
v0.0.0-...-1704659 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, db *sqlx.DB, desired *State) error

Types

type MigrationFunc

type MigrationFunc = func(tx TxAPI) error

type State

type State struct {
	// contains filtered or unexported fields
}

func InitialState

func InitialState() *State

func (*State) Apply

func (s *State) Apply(fn MigrationFunc) *State

func (*State) ApplyStmt

func (s *State) ApplyStmt(q string) *State

func (*State) N

func (s *State) N() int

type TxAPI

type TxAPI interface {
	sqlx.Execer
}

Jump to

Keyboard shortcuts

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