Documentation ¶
Index ¶
- Constants
- Variables
- func ContextWithDB(ctx context.Context, db DB) context.Context
- type DB
- type DBExecer
- type Driver
- type Option
- type Target
- func (target *Target) Add(migration migrations.Migration) error
- func (target *Target) Create() error
- func (target *Target) Current() (migrations.Migration, error)
- func (target *Target) Destroy() error
- func (target *Target) Done() ([]migrations.Migration, error)
- func (target *Target) Remove(migration migrations.Migration) error
Constants ¶
View Source
const DefaultMigrationsTableName = "_migrations"
Variables ¶
View Source
var ( ErrDBInstanceNotFound = errors.New("db instance not found on the context") ErrInvalidDBInstance = errors.New("context has an invalid db instance") )
View Source
var (
ErrMissingSource = errors.New("source is required")
)
Functions ¶
Types ¶
type Driver ¶
type Driver interface { migrations.TargetLocker Add(migration migrations.Migration) error Remove(migration migrations.Migration) error }
Click to show internal directories.
Click to hide internal directories.