abstractMigration
Index
Constructors
constructor
Parameters
driver: AbstractSqlDriver<AbstractSqlConnection, AbstractSqlPlatform>
config: Configuration<IDatabaseDriver<Connection>, EntityManager<IDatabaseDriver<Connection>>>
Returns Migration
Methods
addSql
Parameters
sql: Query
Returns void
down
Returns void | Promise<void>
execute
Parameters
sql: Query
optionalparams: unknown[]
Returns Promise<EntityData<Partial<any>>[]>
getEntityManager
Creates a cached
EntityManager
instance for this migration, which will respect the current transaction context.Returns SqlEntityManager<AbstractSqlDriver<AbstractSqlConnection, AbstractSqlPlatform>>
getKnex
Returns Knex<any, any[]>
getQueries
Returns Query[]
isTransactional
Returns boolean
reset
Returns void
setTransactionContext
Parameters
ctx: any
Returns void
abstractup
Returns void | Promise<void>
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.