Versions in this module Expand all Collapse all v1 v1.0.0 Apr 30, 2021 Changes in this version + func Migrate(d Driver, migrations []Migration, infoChan chan MigrationInfo) error + func SetTable(name string) + func Validate(d Driver, migrations []Migration) error + type Darwin struct + func New(driver Driver, migrations []Migration, infoChan chan MigrationInfo) Darwin + func (d Darwin) Info() ([]MigrationInfo, error) + func (d Darwin) Migrate() error + func (d Darwin) Validate() error + type Dialect interface + AllSQL func() string + CreateTableSQL func() string + InsertSQL func() string + type Driver interface + All func() ([]MigrationRecord, error) + Create func() error + Exec func(string) (time.Duration, error) + Insert func(e MigrationRecord) error + type DuplicateMigrationVersionError struct + Version float64 + func (d DuplicateMigrationVersionError) Error() string + type GenericDriver struct + DB *sql.DB + Dialect Dialect + func NewGenericDriver(db *sql.DB, dialect Dialect) *GenericDriver + func (m *GenericDriver) All() ([]MigrationRecord, error) + func (m *GenericDriver) Create() error + func (m *GenericDriver) Exec(script string) (time.Duration, error) + func (m *GenericDriver) Insert(e MigrationRecord) error + type IllegalMigrationVersionError struct + Version float64 + func (i IllegalMigrationVersionError) Error() string + type InvalidChecksumError struct + Version float64 + func (i InvalidChecksumError) Error() string + type Migration struct + Description string + Exec func(db *sql.DB) error + Script string + Version float64 + func (m Migration) Checksum() string + type MigrationInfo struct + Error error + Migration Migration + Status Status + func Info(d Driver, migrations []Migration) ([]MigrationInfo, error) + type MigrationRecord struct + AppliedAt time.Time + Checksum string + Description string + ExecutionTime time.Duration + Version float64 + type MySQLDialect struct + func (m MySQLDialect) AllSQL() string + func (m MySQLDialect) CreateTableSQL() string + func (m MySQLDialect) InsertSQL() string + type PostgresDialect struct + func (p PostgresDialect) AllSQL() string + func (p PostgresDialect) CreateTableSQL() string + func (p PostgresDialect) InsertSQL() string + type QLDialect struct + func (QLDialect) AllSQL() string + func (QLDialect) CreateTableSQL() string + func (QLDialect) InsertSQL() string + type RemovedMigrationError struct + Version float64 + func (r RemovedMigrationError) Error() string + type SqliteDialect struct + func (s SqliteDialect) AllSQL() string + func (s SqliteDialect) CreateTableSQL() string + func (s SqliteDialect) InsertSQL() string + type Status int + const Applied + const Error + const Ignored + const Pending + func (s Status) String() string