action

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateModeUp   = "up"
	CreateModeDown = "down"
	CreateModeBoth = "both"
)

Migrations create modes.

View Source
const DefaultMigrationNameFormat = "%d%02d%02d_%02d%02d%02d_%s_%s.sql"

DefaultMigrationNameFormat contains template for create migration name.

Variables

This section is empty.

Functions

func MakeCreate

func MakeCreate(cfgPath, name, mode, project, db string) error

MakeCreate creates new migration file.

func MakeDown

func MakeDown(mStorage storage.Storage, cfgPath, projectName, dbName string, rollbackCount int, skipNoRollback bool) error

MakeDown reverts migrations.

func MakeList

func MakeList(mStorage storage.Storage, cfgPath, projectName, dbName string, rollbackCount *int, skipNoRollback bool) error

MakeList shows success applied migrations.

func MakeUp

func MakeUp(mStorage storage.Storage, cfgPath string, project, dbName *string) error

MakeUp applies migrations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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