Migration class

Base class for a database migration.

Each migration can move between 2 versions that are defined by startVersion and endVersion.

Constructors

Migration(int startVersion, int endVersion, Future<void> migrate(Database database))
Creates a new migration between startVersion and endVersion. migrate will be called by the database and performs the actual migration.

Properties

endVersion int
The start version of the database.
final
hashCode int
The hash code for this object.
no setteroverride
migrate Future<void> Function(Database database)
Function that performs the migration.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startVersion int
The start version of the database.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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