migrate

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 7 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 DownPlugin added in v0.4.0

func DownPlugin(configFile io.Reader, migrations packd.Walkable) plugins.Plugin

func Plugins added in v0.4.1

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

func UpPlugin added in v0.4.0

func UpPlugin(configFile io.Reader, migrations packd.Walkable) 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 MigrateDown

type MigrateDown struct {
	// 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 {
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

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