Migration class abstract

A collection of MigrationCommands to update the Schema.

Constructors

Migration({required int version, required List<MigrationCommand> up, required List<MigrationCommand> down})
A collection of MigrationCommands to update the Schema.
const

Properties

down → List<MigrationCommand>
Reverts up
final
downStatement → String
Revert of upStatement
no setter
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statement → String
Alias of upStatement
no setter
up → List<MigrationCommand>
Desired changes to the Schema.
final
upStatement → String
Generate SQL statements for all commands
no setter
version → int
Order to run; should be unique and sequential with other Migrations
final

Methods

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.
override

Static Methods

generate(List<MigrationCommand> commands, int version) → String
SQL command to produce the migration