abstractMigration
Index
Constructors
constructor
Parameters
driver: AbstractSqlDriver<AbstractSqlConnection, AbstractSqlPlatform>
config: Configuration<IDatabaseDriver<Connection>>
Returns Migration
Methods
addSql
Parameters
sql: Query
Returns void
down
Returns 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 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.