createMysqlMigrator

FunctionExperimental

Signature

function createMysqlMigrator<TTxContext>(__namedParameters): Migrator;

mysql/src/migration-store/migration-store.mysql.ts:197

Type Parameters

  • TTxContext
    extends BaseTxContext

Parameters

  • __namedParameters
    object
  • __namedParameters.after?
    Runs under the lease after the migrations have run, unless one failed. Records nothing.
  • __namedParameters.before?
    Runs under the lease on every run, before the history is read. Records nothing.
  • __namedParameters.lock?
    object
    Timing of the lease.
  • __namedParameters.lock.heartbeatIntervalMs?
    number
    How often the lease is extended while migrating. Below a third of ttlMs.
  • __namedParameters.lock.pollIntervalMs?
    number
    How often a waiting process re-attempts to claim the lease.
  • __namedParameters.lock.ttlMs?
    number
    How long a claimed lease stays valid without a heartbeat.
  • __namedParameters.lockTableName?
    string
    Table that holds the migration lease.
  • __namedParameters.migrations
    Migration<NoInfer<TTxContext>>[]
    The migrations, in the order they run. Append new migrations at the end.
  • __namedParameters.migrationTableName?
    string
    Table that records applied migrations.
  • __namedParameters.schema?
    string
    Database that holds the history and lease tables.
  • __namedParameters.stateProvider
    MysqlStateProvider<TTxContext>
    The provider the migrator keeps its history and lease through.

Returns

Used in guides

esc

Search guides, integrations and every exported symbol.

↑ ↓ to navigate↵ to open