MigrationRunner class final Schema Migrations

Driver-agnostic migration engine: runs SQL against any Connection and tracks applied versions. Migration files are supplied by a MigrationSource.

Constructors

MigrationRunner(Connection connection, MigrationSource source)

Properties

connection Connection
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source MigrationSource
final

Methods

appliedVersions() Future<List<String>>
Applied versions, ascending.
ensureTrackerTable() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
revertLast() Future<String?>
Reverts the most recently applied migration (runs its down SQL) and returns its version, or null if nothing was applied.
runPending() Future<List<String>>
Applies every pending migration (each in a transaction) and returns the versions that ran.
status() Future<MigrationStatus>
toString() String
A string representation of this object.
inherited

Operators

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