Documentation
¶
Index ¶
- Constants
- func Down(m Instruction, vault internal.Vault, tableName string) (err error)
- func State(m Instruction, vault internal.Vault, tableName string) (exists Instruction, nonExists Instruction, undefined Instruction, err error)
- func Up(m Instruction, vault internal.Vault, tableName string) (err error)
- type Instruction
- func ExtractInstructions(folder http.FileSystem, root string) (Instruction, error)
- func MakeTableInstruction(tableName string, tableFields interface{}, dialect internal.Dialect) (Instruction, error)
- func NewInstruction(id, up, down string) Instruction
- func Plan(m Instruction, vault internal.Vault, tableName string) (items Instruction, err error)
Constants ¶
View Source
const ( MigrationCommandPrefix = "--- #migrate:" MigrationDirectionUp = "up" MigrationDirectionDown = "down" )
Variables ¶
This section is empty.
Functions ¶
func State ¶
func State(m Instruction, vault internal.Vault, tableName string) (exists Instruction, nonExists Instruction, undefined Instruction, err error)
Types ¶
type Instruction ¶
Instruction is a list of instructions
func ExtractInstructions ¶
func ExtractInstructions(folder http.FileSystem, root string) (Instruction, error)
ExtractInstructions extracts migrations from a folder
func MakeTableInstruction ¶ added in v0.0.1
func MakeTableInstruction(tableName string, tableFields interface{}, dialect internal.Dialect) (Instruction, error)
MakeTableInstruction creates a migration instruction for SQLite3 database from a struct
func NewInstruction ¶
func NewInstruction(id, up, down string) Instruction
func Plan ¶
func Plan(m Instruction, vault internal.Vault, tableName string) (items Instruction, err error)
Click to show internal directories.
Click to hide internal directories.