Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotParseDirection = errors.New("could not parse direction for migration")
Functions ¶
This section is empty.
Types ¶
type Migrator ¶
type Migrator interface { CurrentVersion() (int, error) SupportedVersion() (int, error) Migrate(version int) error Up() error Migrations() ([]migration, error) }
func NewMigrator ¶
func NewMigrator(db *sql.DB, lockFactory lock.LockFactory, strategy encryption.Strategy) Migrator
func NewMigratorForMigrations ¶
func NewMigratorForMigrations(db *sql.DB, lockFactory lock.LockFactory, strategy encryption.Strategy, bindata Bindata) Migrator
type OpenHelper ¶
type OpenHelper struct {
// contains filtered or unexported fields
}
func NewOpenHelper ¶
func NewOpenHelper(driver, name string, lockFactory lock.LockFactory, strategy encryption.Strategy) *OpenHelper
func (*OpenHelper) CurrentVersion ¶
func (self *OpenHelper) CurrentVersion() (int, error)
func (*OpenHelper) MigrateToVersion ¶
func (self *OpenHelper) MigrateToVersion(version int) error
func (*OpenHelper) OpenAtVersion ¶
func (self *OpenHelper) OpenAtVersion(version int) (*sql.DB, error)
func (*OpenHelper) SupportedVersion ¶
func (self *OpenHelper) SupportedVersion() (int, error)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseFileToMigration ¶
func (*Parser) ParseMigrationFilename ¶
Click to show internal directories.
Click to hide internal directories.