migrator

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInvalidDatabase = errors.New("invalid database")
)

Functions

This section is empty.

Types

type Control

type Control interface {
	DB(name ...string) *quirk.Quirk
}

type Manager

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

func (*Manager) Add

func (m *Manager) Add() *Migration

func (*Manager) GetAll

func (m *Manager) GetAll() []*Migration

type Migration

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

func (*Migration) Down

func (m *Migration) Down(fn func(c Control)) *Migration

func (Migration) Init

func (m Migration) Init()

func (Migration) New

func (m Migration) New()

func (Migration) Run

func (m Migration) Run()

func (*Migration) Up

func (m *Migration) Up(fn func(c Control)) *Migration

type Migrator

type Migrator interface {
	Run()
}

func New

func New(dir string, databases map[string]*quirk.DB, migrations []*Migration) Migrator

Jump to

Keyboard shortcuts

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