Migration class
Constructors
- Migration({required int from, required int to, required MigrationFn migrate})
- Creates a migration definition.
- Migration.withContext({required int from, required int to, required MigrationFnWithContext migrate})
- Creates a migration definition that uses MigrationContext.
Properties
- from → int
-
Source schema version.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- migrate → MigrationFn
-
Migration callback for transforming payloads.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- to → int
-
Target schema version.
final
Methods
-
apply(
Map< String, dynamic> payload, MigrationContext context) → Map<String, dynamic> -
Applies the migration using
context. -
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