Type Alias: MigrationRunnerOptions
MigrationRunnerOptions =
object
Defined in: migrations/runner.ts:23
Properties
allowUnbaselined?
optionalallowUnbaselined?:boolean
Defined in: migrations/runner.ts:56
The default for run's option of the same name: run against a populated
database whose ledger is empty, which the runner otherwise refuses. Set it
where the application knows its database can only ever be new — a test
fixture, or a deployment that creates one per run.
Default
false
ledgerTable?
optionalledgerTable?:string
Defined in: migrations/runner.ts:41
Default
'schema_migrations'
lockKey?
optionallockKey?:number
Defined in: migrations/runner.ts:37
Default
DEFAULT_MIGRATION_LOCK_KEY
lockTimeoutMs?
optionallockTimeoutMs?:number
Defined in: migrations/runner.ts:39
Bound on waiting for the lock; see syncWithAdvisoryLock.
log?
optionallog?: (message) =>void
Defined in: migrations/runner.ts:48
Where progress goes.
Parameters
| Parameter | Type |
|---|---|
message | string |
Returns
void
Default
stderr
migrations
migrations:
Migration[]
Defined in: migrations/runner.ts:25
In the order they run. Names must be unique.
sequelize?
optionalsequelize?:Sequelize
Defined in: migrations/runner.ts:35
The connection to run on. Omitted, the runner opens its own from the
DATABASE_* environment variables and closes it on close().
sync?
optionalsync?: () =>Promise<void>
Defined in: migrations/runner.ts:30
The application's schema sync, made available to migrations as
context.sync(). Optional: a migration that only rewrites data needs none.
Returns
Promise<void>
version?
optionalversion?:string
Defined in: migrations/runner.ts:46
Recorded with every applied migration — the application's version or image tag — so the ledger answers which release ran it.