cmd

package
v0.0.0-...-0907076 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownCmd

func DownCmd(m *migrate.Migrate, limit int64) error

func GotoCmd

func GotoCmd(m *migrate.Migrate, v uint64, direction string) error

func GotoVersionCmd

func GotoVersionCmd(m *migrate.Migrate, gotoVersion int64) error

func SquashCmd

func SquashCmd(m *migrate.Migrate, from uint64, version int64, name, directory string) (versions []int64, err error)

func UpCmd

func UpCmd(m *migrate.Migrate, limit int64) error

Types

type CreateOptions

type CreateOptions struct {
	Version   string
	Directory string
	Name      string
	MetaUp    []byte
	MetaDown  []byte
	SQLUp     []byte
	SQLDown   []byte
}

func New

func New(version int64, name, directory string) *CreateOptions

func (*CreateOptions) Create

func (c *CreateOptions) Create() error

func (*CreateOptions) Delete

func (c *CreateOptions) Delete() error

func (*CreateOptions) SetMetaDown

func (c *CreateOptions) SetMetaDown(data interface{}) error

func (*CreateOptions) SetMetaUp

func (c *CreateOptions) SetMetaUp(data interface{}) error

func (*CreateOptions) SetMetaUpFromFile

func (c *CreateOptions) SetMetaUpFromFile(filePath string) error

func (*CreateOptions) SetSQLDown

func (c *CreateOptions) SetSQLDown(data string) error

func (*CreateOptions) SetSQLUp

func (c *CreateOptions) SetSQLUp(data string) error

func (*CreateOptions) SetSQLUpFromFile

func (c *CreateOptions) SetSQLUpFromFile(filePath string) error

Jump to

Keyboard shortcuts

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