migrator

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator deprecated

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

Migrator is a migration manager that handles migration logic.

Deprecated: use github.com/go-rel/migration instead

func New

func New(repo rel.Repository) Migrator

New migrationr.

func (*Migrator) Instrumentation

func (m *Migrator) Instrumentation(instrumenter rel.Instrumenter)

Instrumentation function.

func (*Migrator) Migrate

func (m *Migrator) Migrate(ctx context.Context)

Migrate to the latest schema version.

func (*Migrator) Register

func (m *Migrator) Register(v int, up func(schema *rel.Schema), down func(schema *rel.Schema))

Register a migration.

func (*Migrator) Rollback

func (m *Migrator) Rollback(ctx context.Context)

Rollback migration 1 step.

Jump to

Keyboard shortcuts

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