Skip to main content
Version: 4.5

Class: MigrationStorage#

migrations.MigrationStorage

Constructors#

constructor#

+ new MigrationStorage(driver: AbstractSqlDriver<AbstractSqlConnection>, options: MigrationsOptions): MigrationStorage

Parameters:#

NameType
driverAbstractSqlDriver<AbstractSqlConnection>
optionsMigrationsOptions

Returns: MigrationStorage

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

Properties#

connection#

Private Readonly connection: AbstractSqlConnection

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


driver#

Protected Readonly driver: AbstractSqlDriver<AbstractSqlConnection>


helper#

Private Readonly helper: SchemaHelper

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


knex#

Private Readonly knex: Knex<any, unknown[]>

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


masterTransaction#

Private Optional masterTransaction: any

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


options#

Protected Readonly options: MigrationsOptions

Methods#

ensureTable#

ensureTable(): Promise<void>

Returns: Promise<void>

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


executed#

executed(): Promise<string[]>

Returns: Promise<string[]>

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


getExecutedMigrations#

getExecutedMigrations(): Promise<MigrationRow[]>

Returns: Promise<MigrationRow[]>

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


logMigration#

logMigration(name: string): Promise<void>

Parameters:#

NameType
namestring

Returns: Promise<void>

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


setMasterMigration#

setMasterMigration(trx: any): void

Parameters:#

NameType
trxany

Returns: void

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


unlogMigration#

unlogMigration(name: string): Promise<void>

Parameters:#

NameType
namestring

Returns: Promise<void>

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


unsetMasterMigration#

unsetMasterMigration(): void

Returns: void

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

Last updated on by Renovate Bot