Versions in this module Expand all Collapse all v0 v0.1.0 Sep 3, 2015 Changes in this version + var MigrationDialects = map[string]gorp.Dialect + func Exec(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) + func ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) + func SetSchema(name string) + func SetTable(name string) + type AssetMigrationSource struct + Asset func(path string) ([]byte, error) + AssetDir func(path string) ([]string, error) + Dir string + func (a AssetMigrationSource) FindMigrations() ([]*Migration, error) + type FileMigrationSource struct + Dir string + func (f FileMigrationSource) FindMigrations() ([]*Migration, error) + type MemoryMigrationSource struct + Migrations []*Migration + func (m MemoryMigrationSource) FindMigrations() ([]*Migration, error) + type Migration struct + Down []string + Id string + Up []string + func ParseMigration(id string, r io.ReadSeeker) (*Migration, error) + func ToApply(migrations []*Migration, current string, direction MigrationDirection) []*Migration + func (m Migration) Less(other *Migration) bool + func (m Migration) NumberPrefixMatches() []string + func (m Migration) VersionInt() int64 + type MigrationDirection int + const Down + const Up + type MigrationRecord struct + AppliedAt time.Time + Id string + func GetMigrationRecords(db *sql.DB, dialect string) ([]*MigrationRecord, error) + type MigrationSource interface + FindMigrations func() ([]*Migration, error) + type PlannedMigration struct + Queries []string + func PlanMigration(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) ([]*PlannedMigration, *gorp.DbMap, error) + func ToCatchup(migrations, existingMigrations []*Migration, lastRun *Migration) []*PlannedMigration