Version: 4.3

Class: Migration

Hierarchy

  • Migration

Constructors

constructor

+ new Migration(driver: AbstractSqlDriver, config: Configuration): Migration

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

Parameters:

NameType
driverAbstractSqlDriver
configConfiguration

Returns: Migration

Properties

config

Protected Readonly config: Configuration

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


ctx

Protected Optional ctx: Transaction<Transaction>

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


driver

Protected Readonly driver: AbstractSqlDriver

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


queries

Private Readonly queries: Query[] = []

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

Methods

addSql

addSql(sql: Query): void

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

Parameters:

NameType
sqlQuery

Returns: void


down

down(): Promise<void>

Defined in packages/core/src/typings.ts:348

Returns: Promise<void>


execute

execute(sql: Query): Promise<EntityData<AnyEntity<any>>[]>

Defined in packages/migrations/src/Migration.ts:37

Parameters:

NameType
sqlQuery

Returns: Promise<EntityData<AnyEntity<any>>[]>


getKnex

getKnex(): any

Defined in packages/migrations/src/Migration.ts:41

Returns: any


getQueries

getQueries(): Query[]

Defined in packages/migrations/src/Migration.ts:45

Returns: Query[]


isTransactional

isTransactional(): boolean

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

Returns: boolean


reset

reset(): void

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

Returns: void


setTransactionContext

setTransactionContext(ctx: Transaction): void

Defined in packages/migrations/src/Migration.ts:33

Parameters:

NameType
ctxTransaction

Returns: void


up

Abstractup(): Promise<void>

Defined in packages/core/src/typings.ts:347

Returns: Promise<void>

Abstractup(): Promise<void>

Defined in packages/migrations/src/Migration.ts:14

Returns: Promise<void>

Last updated on by Martin Adámek