Create a new PrormMigration instance
Configuration options
Get the QueryInterface
Get the Prorm instance
Get the migrations table name
Ensure the migrations table exists
Load migration metadata from the database
Record a migration as executed in the database
The migration to record
The batch number
Remove a migration record from the database
Name of the migration to remove
Get all executed migrations
Check if a migration has been executed
Name of the migration
Run a migration
The migration to run
Optionalbatch: number
Optional batch number to record this migration under. When
omitted, a fresh batch number is computed for this single migration.
runMigrations() passes an explicit shared batch so that all migrations
applied in one run land in the same batch.
Execute all pending migrations
Array of migrations to run
Revert migrations to a specific batch
For each executed migration with a batch number greater than
targetBatch, this loads its down() function (via the supplied
migrations lookup) and actually executes it before removing its
tracking row. If down() throws, the error is logged and re-thrown, and
the tracking row for that migration (and any migrations after it) is
left in place so the revert can be retried.
Get the current database version
Sync the migrations table
PrormMigration - Integrates with Prorm to manage migrations