Versions in this module Expand all Collapse all v0 v0.0.3 Aug 7, 2021 Changes in this version + const MigrationDelimiter + func Run(ctx context.Context, m Migrator, l Loader) error + type DiskLoader struct + func NewDiskLoader(path string) *DiskLoader + func (fs *DiskLoader) Load() ([]*Migration, error) + type EmbedLoader struct + func NewEmbedLoader(fs embed.FS, path string) *EmbedLoader + func (efs *EmbedLoader) Load() ([]*Migration, error) + type Loader interface + Load func() ([]*Migration, error) + type Migration struct + Apply string + ID int + Name string + Rollback string + type Migrator interface + Exec func(ctx context.Context, query string, args ...interface{}) error + Lock func(ctx context.Context) error + SetVersion func(ctx context.Context, version int) error + Unlock func(ctx context.Context) error + Version func(ctx context.Context) (version int, err error) + type MigratorClickHouse struct + func NewMigratorClickHouse(db *sql.DB) *MigratorClickHouse + func (ch *MigratorClickHouse) Exec(ctx context.Context, query string, args ...interface{}) error + func (ch *MigratorClickHouse) Lock(ctx context.Context) error + func (ch *MigratorClickHouse) SetVersion(ctx context.Context, version int) error + func (ch *MigratorClickHouse) Unlock(ctx context.Context) error + func (ch *MigratorClickHouse) Version(ctx context.Context) (version int, err error) + type MigratorMySQL struct + func NewMigratorMySQL(db *sql.DB) *MigratorMySQL + func (my *MigratorMySQL) Exec(ctx context.Context, query string, args ...interface{}) error + func (my *MigratorMySQL) Lock(ctx context.Context) error + func (my *MigratorMySQL) SetVersion(ctx context.Context, version int) error + func (my *MigratorMySQL) Unlock(ctx context.Context) error + func (my *MigratorMySQL) Version(ctx context.Context) (version int, err error) + type MigratorPostgres struct + func NewMigratorPostgres(db *sql.DB) *MigratorPostgres + func (pg *MigratorPostgres) Exec(ctx context.Context, query string, args ...interface{}) error + func (pg *MigratorPostgres) Lock(ctx context.Context) error + func (pg *MigratorPostgres) SetVersion(ctx context.Context, version int) error + func (pg *MigratorPostgres) Unlock(ctx context.Context) error + func (pg *MigratorPostgres) Version(ctx context.Context) (version int, err error) Other modules containing this package github.com/cristalhq/dbumper