migration

package
v0.0.0-...-62db38d Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrate

type Migrate struct {
	Up   *MigrateElm
	Down *MigrateElm
}

type MigrateElm

type MigrateElm struct {
	File string
	SQL  string
}

type Migrates

type Migrates struct {
	Map       map[string]*Migrate // map[tableName]Migrate
	Order     []string            // []tableName
	OutputDir string
}

func NewMigrate

func NewMigrate(sqls map[string]*sql.SQL, dependencyMap map[string]map[string]struct{}, output string) *Migrates

func (*Migrates) Print

func (m *Migrates) Print(table string)

func (*Migrates) WriteFile

func (m *Migrates) WriteFile(fs *afero.Fs) (err error)

Jump to

Keyboard shortcuts

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