Version: 4.3

Class: MigrationRunner

Hierarchy

  • MigrationRunner

Constructors

constructor

+ new MigrationRunner(driver: AbstractSqlDriver, options: MigrationsOptions, config: Configuration): MigrationRunner

Defined in packages/migrations/src/MigrationRunner.ts:9

Parameters:

NameType
driverAbstractSqlDriver
optionsMigrationsOptions
configConfiguration

Returns: MigrationRunner

Properties

config

Protected Readonly config: Configuration

Defined in packages/migrations/src/MigrationRunner.ts:13


connection

Private Readonly connection: AbstractSqlConnection = this.driver.getConnection()

Defined in packages/migrations/src/MigrationRunner.ts:7


driver

Protected Readonly driver: AbstractSqlDriver

Defined in packages/migrations/src/MigrationRunner.ts:11


helper

Private Readonly helper: SchemaHelper = this.driver.getPlatform().getSchemaHelper()!

Defined in packages/migrations/src/MigrationRunner.ts:8


masterTransaction

Private Optional masterTransaction: Transaction

Defined in packages/migrations/src/MigrationRunner.ts:9


options

Protected Readonly options: MigrationsOptions

Defined in packages/migrations/src/MigrationRunner.ts:12

Methods

getQueries

PrivategetQueries(migration: Migration, method: "up" | "down"): Promise<Query[]>

Defined in packages/migrations/src/MigrationRunner.ts:38

Parameters:

NameType
migrationMigration
method"up" | "down"

Returns: Promise<Query[]>


run

run(migration: Migration, method: "up" | "down"): Promise<void>

Defined in packages/migrations/src/MigrationRunner.ts:15

Parameters:

NameType
migrationMigration
method"up" | "down"

Returns: Promise<void>


setMasterMigration

setMasterMigration(trx: Transaction): void

Defined in packages/migrations/src/MigrationRunner.ts:30

Parameters:

NameType
trxTransaction

Returns: void


unsetMasterMigration

unsetMasterMigration(): void

Defined in packages/migrations/src/MigrationRunner.ts:34

Returns: void

Last updated on by Martin Adámek