Skip to main content
Version: 6.4

abstractMigration

Index

Constructors

constructor

Methods

addSql

  • Parameters

    Returns void

down

  • down(): void | Promise<void>
  • Returns void | Promise<void>

execute

  • execute(sql: Query, params?: unknown[]): Promise<EntityData<Partial<any>>[]>
  • Executes a raw SQL query. Accepts a string SQL or a knex query builder instance. The params parameter is respected only if you use string SQL in the first parameter.


    Parameters

    • sql: Query
    • optionalparams: unknown[]

    Returns Promise<EntityData<Partial<any>>[]>

getEntityManager

getKnex

  • getKnex(): Knex<any, any[]>
  • Returns Knex<any, any[]>

getQueries

isTransactional

  • isTransactional(): boolean
  • Returns boolean

reset

  • reset(): void
  • Returns void

setTransactionContext

  • setTransactionContext(ctx: any): void
  • Parameters

    • ctx: any

    Returns void

abstractup

  • up(): void | Promise<void>
  • Returns void | Promise<void>