migrate

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MigrationTableName = "raptor_migrations"
)

Variables

This section is empty.

Functions

func CreateMigrationNameFromPath added in v0.9.0

func CreateMigrationNameFromPath(path, up, down string) string

func Down added in v0.9.0

func Down(ctx context.Context, db raptor.DB, m ...Migration) error

func Up

func Up(ctx context.Context, db raptor.DB, m ...Migration) error

Types

type FSOptions added in v0.9.0

type FSOptions struct {
	UpSuffix   string
	DownSuffix string
	Name       func(string, string, string) string
}

type Migration

type Migration struct {
	Name string
	Up   []string
	Down []string
}

func FromFS added in v0.9.0

func FromFS(f fs.FS, options ...func(*FSOptions)) ([]Migration, error)

Jump to

Keyboard shortcuts

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