Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoFwMigration = errors.Errorf("no sql in forward migration step")
Functions ¶
func FindMigrations ¶
func FindMigrationsEx ¶
func FindMigrationsEx(path string, fs MigratorFS) ([]string, error)
Types ¶
type BadVersionError ¶
type BadVersionError string
func (BadVersionError) Error ¶
func (e BadVersionError) Error() string
type IrreversibleMigrationError ¶
type IrreversibleMigrationError struct {
// contains filtered or unexported fields
}
func (IrreversibleMigrationError) Error ¶
func (e IrreversibleMigrationError) Error() string
type MigrationPgError ¶
type Migrator ¶
type Migrator struct { Migrations []*Migration OnStart func(int32, string, string, string) // OnStart is called when a migration is run with the sequence, name, direction, and SQL Data map[string]interface{} // Data available to use in migrations // contains filtered or unexported fields }
func NewMigratorEx ¶
func (*Migrator) AppendMigration ¶
func (*Migrator) GetCurrentVersion ¶
func (*Migrator) LoadMigrations ¶
type MigratorFS ¶
type MigratorOptions ¶
type MigratorOptions struct { // DisableTx causes the Migrator not to run migrations in a transaction. DisableTx bool // MigratorFS is the interface used for collecting the migrations. MigratorFS MigratorFS }
type NoMigrationsFoundError ¶
type NoMigrationsFoundError struct {
Path string
}
func (NoMigrationsFoundError) Error ¶
func (e NoMigrationsFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.