migrate

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotFindConnection = errors.New("could not find connection by name")
	ErrNotEnoughArgs          = errors.New("not enough args, please specify direction p.e ox pop migrate up")
	ErrInvalidInstruction     = errors.New("invalid instruction for migrate command")
)

Functions

func Plugins added in v0.4.1

func Plugins(migrations packd.Box) []plugins.Plugin

Types

type Command added in v0.4.1

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

func (Command) HelpText added in v0.4.1

func (m Command) HelpText() string

HelpText resturns the help Text of build function

func (*Command) Name added in v0.4.1

func (m *Command) Name() string

func (*Command) ParentName added in v0.4.1

func (m *Command) ParentName() string

func (*Command) Receive added in v0.4.1

func (m *Command) Receive(pls []plugins.Plugin)

func (*Command) Run added in v0.4.1

func (m *Command) Run(ctx context.Context, root string, args []string) error

func (*Command) Subcommands added in v0.4.1

func (m *Command) Subcommands() []plugins.Command

type Logger added in v0.5.1

type Logger struct{}

func (*Logger) Log added in v0.5.1

func (l *Logger) Log(lvl logging.Level, s string, args ...interface{})

type MigrateDown

type MigrateDown struct {
	*Logger
	// contains filtered or unexported fields
}

func (*MigrateDown) Flags

func (mu *MigrateDown) Flags() *pflag.FlagSet

func (MigrateDown) HelpText added in v0.4.0

func (mu MigrateDown) HelpText() string

func (MigrateDown) Name

func (mu MigrateDown) Name() string

func (MigrateDown) ParentName added in v0.4.0

func (mu MigrateDown) ParentName() string

func (*MigrateDown) ParseFlags

func (mu *MigrateDown) ParseFlags(args []string)

func (*MigrateDown) Run added in v0.4.0

func (mu *MigrateDown) Run(ctx context.Context, root string, args []string) error

Run will run migrations on the current folder, it will look for the migrations folder and attempt to run the migrations using internal pop tooling

type MigrateUp

type MigrateUp struct {
	*Logger
	// contains filtered or unexported fields
}

func (MigrateUp) Direction added in v0.5.1

func (mu MigrateUp) Direction() string

func (*MigrateUp) Flags

func (mu *MigrateUp) Flags() *pflag.FlagSet

func (MigrateUp) HelpText added in v0.4.0

func (mu MigrateUp) HelpText() string

func (MigrateUp) Name

func (mu MigrateUp) Name() string

func (MigrateUp) ParentName added in v0.4.0

func (mu MigrateUp) ParentName() string

func (*MigrateUp) ParseFlags

func (mu *MigrateUp) ParseFlags(args []string)

func (*MigrateUp) Run added in v0.4.0

func (mu *MigrateUp) Run(ctx context.Context, root string, args []string) error

Run will run migrations on the current folder, it will look for the migrations folder and attempt to run the migrations using internal pop tooling

func (*MigrateUp) SetConn added in v0.5.1

func (mu *MigrateUp) SetConn(conn string)

type Migrator

type Migrator interface {
	plugins.Command

	Direction() string
	SetConn(string)
}

Jump to

Keyboard shortcuts

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