migrate

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMigratorFactory         = errors.New("failed to make migrators")
	ErrNoOneMigratorWasDefined = errors.New("no migrators were defined")
)

Functions

This section is empty.

Types

type Migrate

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

func New

func New(ctx context.Context, logger logger.Logger, factory storage.Factorier) (*Migrate, error)

func (*Migrate) Down

func (m *Migrate) Down() error

Down executes each migrator in parallel wrapping them in errgroup without context.

func (*Migrate) Force added in v1.1.0

func (m *Migrate) Force(n int, storage storage.Storager) error

func (*Migrate) Storages added in v1.1.1

func (m *Migrate) Storages() []storage.Storager

Storages returns all for self management.

func (*Migrate) Up

func (m *Migrate) Up() error

Up executes each migrator in parallel wrapping them in errgroup without context.

func (*Migrate) Version added in v1.1.0

func (m *Migrate) Version(storage storage.Storager) (version uint, dirty bool, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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