migration

package
v0.0.0-...-f70f7d2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileMigration

func NewFileMigration(path string) migrate.MigrationSource

NewFileMigration creates a migrate.MigrationSource instance

Types

type Migration

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

Migration represents a migration runner

func NewMigration

func NewMigration(db *sql.DB, dialect string, m migrate.MigrationSource) Migration

NewMigration creates an Migration instance

func (Migration) Down

func (m Migration) Down() (int, error)

Down runs the migration to down

func (Migration) SetSchema

func (m Migration) SetSchema(s string)

SetSchema sets the schema for migrations table

func (Migration) SetTable

func (m Migration) SetTable(t string)

SetTable sets the migrations table name

func (Migration) Up

func (m Migration) Up() (int, error)

Up runs the migrations to up

Jump to

Keyboard shortcuts

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