Versions in this module Expand all Collapse all v4 v4.14.3 Mar 25, 2021 v4.14.2 Mar 25, 2021 Changes in this version + var DefaultParse = Parse + var DefaultRegex = Regex + var ErrParse = fmt.Errorf("no match") + var Regex = regexp.MustCompile(`^([0-9]+)_(.*)\.(` + string(Down) + `|` + string(Up) + `)\.(.*)$`) + func List() []string + func Register(name string, driver Driver) + type Direction string + const Down + const Up + type Driver interface + Close func() error + First func() (version uint, err error) + Next func(version uint) (nextVersion uint, err error) + Open func(url string) (Driver, error) + Prev func(version uint) (prevVersion uint, err error) + ReadDown func(version uint) (r io.ReadCloser, identifier string, err error) + ReadUp func(version uint) (r io.ReadCloser, identifier string, err error) + func Open(url string) (Driver, error) + type ErrDuplicateMigration struct + func (e ErrDuplicateMigration) Error() string + type Migration struct + Direction Direction + Identifier string + Raw string + Version uint + func Parse(raw string) (*Migration, error) + type Migrations struct + func NewMigrations() *Migrations + func (i *Migrations) Append(m *Migration) (ok bool) + func (i *Migrations) Down(version uint) (m *Migration, ok bool) + func (i *Migrations) First() (version uint, ok bool) + func (i *Migrations) Next(version uint) (nextVersion uint, ok bool) + func (i *Migrations) Prev(version uint) (prevVersion uint, ok bool) + func (i *Migrations) Up(version uint) (m *Migration, ok bool) Other modules containing this package github.com/nafhul/migrate