migrator

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator

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

Migrator is a migration manager that handles migration logic.

func New

func New(repo rel.Repository) Migrator

New migrationr.

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