Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EngineOption ¶
type EngineOption func(*Morph)
func SetMigrationTableName ¶
func SetMigrationTableName(name string) EngineOption
func SetSatementTimeoutInSeconds ¶
func SetSatementTimeoutInSeconds(n int) EngineOption
func WithLock ¶
func WithLock(key string) EngineOption
WithLock creates a lock table in the database so that the migrations are guaranteed to be executed from a single instance. The key is used for naming the mutex.
func WithLockTimeout ¶
func WithLockTimeout(lockTimeout time.Duration) EngineOption
func WithLogger ¶
func WithLogger(logger Logger) EngineOption
type Logger ¶
type Logger interface { Printf(format string, v ...interface{}) Println(v ...interface{}) }
type Morph ¶
type Morph struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, driver drivers.Driver, source sources.Source, options ...EngineOption) (*Morph, error)
New creates a new instance of the migrations engine from an existing db instance and a migrations source. If the driver implements the Lockable interface, it will also wait until it has acquired a lock.
Click to show internal directories.
Click to hide internal directories.