QMigration
@quik/database / QMigration
Abstract Class: QMigration
Defined in: database/src/migrations/QMigration.ts:32
Implements
Constructors
Constructor
new QMigration():
QMigration
Returns
QMigration
Accessors
migrationName
Get Signature
get migrationName():
string
Defined in: database/src/migrations/QMigration.ts:37
Gets the name of the migration class. Used for identifying migrations in logs and database records.
Returns
string
Methods
down()
abstractdown(schema,engine):Promise<void|SchemaBuilder>
Defined in: database/src/migrations/QMigration.ts:57
Reverts the migration to rollback changes made to the database schema.
Parameters
schema
SchemaBuilder
The Knex schema builder instance
engine
The Knex connection or transaction instance
Returns
Promise<void | SchemaBuilder>
Throws
If the migration cannot be rolled back
Implementation of
up()
abstractup(schema,engine):Promise<void|SchemaBuilder>
Defined in: database/src/migrations/QMigration.ts:48
Applies the migration to update the database schema.
Parameters
schema
SchemaBuilder
The Knex schema builder instance
engine
The Knex connection or transaction instance
Returns
Promise<void | SchemaBuilder>
Throws
If the migration cannot be applied