Version: 4.3

Class: MigrationStorage

Hierarchy

  • MigrationStorage

Constructors

constructor

+ new MigrationStorage(driver: AbstractSqlDriver, options: MigrationsOptions): MigrationStorage

Defined in packages/migrations/src/MigrationStorage.ts:10

Parameters:

NameType
driverAbstractSqlDriver
optionsMigrationsOptions

Returns: MigrationStorage

Properties

connection

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

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


driver

Protected Readonly driver: AbstractSqlDriver

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


helper

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

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


knex

Private Readonly knex: any = this.connection.getKnex()

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


masterTransaction

Private Optional masterTransaction: Transaction

Defined in packages/migrations/src/MigrationStorage.ts:10


options

Protected Readonly options: MigrationsOptions

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

Methods

ensureTable

ensureTable(): Promise<void>

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

Returns: Promise<void>


executed

executed(): Promise<string[]>

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

Returns: Promise<string[]>


getExecutedMigrations

getExecutedMigrations(): Promise<MigrationRow[]>

Defined in packages/migrations/src/MigrationStorage.ts:28

Returns: Promise<MigrationRow[]>


logMigration

logMigration(name: string): Promise<void>

Defined in packages/migrations/src/MigrationStorage.ts:20

Parameters:

NameType
namestring

Returns: Promise<void>


setMasterMigration

setMasterMigration(trx: Transaction): void

Defined in packages/migrations/src/MigrationStorage.ts:52

Parameters:

NameType
trxTransaction

Returns: void


unlogMigration

unlogMigration(name: string): Promise<void>

Defined in packages/migrations/src/MigrationStorage.ts:24

Parameters:

NameType
namestring

Returns: Promise<void>


unsetMasterMigration

unsetMasterMigration(): void

Defined in packages/migrations/src/MigrationStorage.ts:56

Returns: void

Last updated on by Martin Adámek