migration

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewWith

func NewWith(conn *sqlx.DB, runner Runner, l logger.Logger) (*Command, error)

func (Command) Create

func (c Command) Create() error

func (Command) Database

func (c Command) Database() (string, error)

func (Command) Down

func (c Command) Down(ctx context.Context, size int) error

func (Command) Drop

func (c Command) Drop() error

func (Command) Exec

func (c Command) Exec(ctx context.Context, cmd string, args ...string) error

func (Command) Generate

func (c Command) Generate(ctx context.Context, name string) error

func (Command) Up

func (c Command) Up(ctx context.Context, size int) error

func (*Command) Version

func (c *Command) Version() (string, error)

type Runner

type Runner interface {
	Up(ctx context.Context, db db.Tx, size int) error
	Down(ctx context.Context, db db.Tx, size int) error
}

Directories

Path Synopsis
adapter

Jump to

Keyboard shortcuts

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