MigrationRunner class
Manages the execution and rollback of database migrations.
Each individual migration is wrapped in a transaction. If a migration fails, only that migration is rolled back and execution stops. An advisory lock is acquired to prevent concurrent migration runs.
Constructors
-
MigrationRunner(DatabaseAdapter _db, List<
MigrationEntry> _registry) -
Creates a new MigrationRunner with the database
dband aregistryof migrations.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rollback(
) → Future< void> - Rolls back the most recent batch of migrations.
-
run(
) → Future< void> - Runs all pending migrations that haven't been applied yet.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited