Initializate the migrator.
A connected DataContext instance use for running queries.
The directory to use for migration scripts, which defaults to "migrations." If the path is not absolute, it's considered relative to the current working directory.
A Logger instance for logging info about the migration process.
A PathHelper instance for creating the migration directory.
A connected DataContext instance use for running queries.
A Logger instance for logging info about the migration process.
The directory to use for migration scripts, which defaults to "migrations." If the path is not absolute, it's considered relative to the current working directory.
A PathHelper instance for creating the migration directory.
Create a migration.
The name of the migration file.
Create the migration directory if it doesn't exist.
Create the migrations table if it doesn't exist.
Bring down the last migration.
List all the migration files in the migrations directory, ordered by name, descending (newest first).
The order of the returned files. 1 for ascending; -1 for descending.
Helper to load a migration script. It's just a wrapper around require(), but is helpful for mocking.
The full path to the migration script.
Retrieve all the migrations from the database.
Retrieve the latest migration, or null if there are no migrations.
Run a script against the database.
The migration script, which will be resolved using [[PathHelper#getAbsolutePath]].
Run a migration in a given direction (up or down).
The migration file without the path.
The direction, up or down.
The return value from the migration method is returned.
Run all new migrations.
Generated using TypeDoc
Driver for running database migrations.