MigrationRunner class final

Applies a static migration history through the database's owned transaction.

The engine and every persisted fingerprint are checked before executing DDL. Pending SQL, catalog verification and history markers commit together. A failure rolls back the whole invocation, including newly created tables. Already-applied history is verified against both source and the live catalog. PostgreSQL managed tables must be logged standalone tables, without partitions or either side of inheritance, including unmanaged neighbors. Foreign-key constraint triggers must enforce ordinary and current writes; catalog checks do not scan PostgreSQL rows for historical violations. An existing internal history table must have the exact required structure; incompatible tables are rejected before application migration SQL runs. PostgreSQL callers on the same database/schema serialize through an advisory transaction lock at read-committed isolation, including first-time creation. Saved PostgreSQL SQL runs with the configured schema first in search_path. SQLite uses the driver's queue and an immediate serializable transaction.

Constructors

MigrationRunner(Database database, MigrationHistory history)
const

Properties

database → Database
final
hashCode → int
The hash code for this object.
no setterinherited
history → MigrationHistory
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply() → Future<List<int>>
Returns the versions applied by this invocation, in registration order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited