Migrator class

Applies ordered migrations and validates continuity.

Constructors

Migrator({required int latestVersion, List<Migration> migrations = const []})
Creates a migrator for latestVersion and migrations.

Properties

hashCode int
The hash code for this object.
no setterinherited
latestVersion int
Latest schema version supported by this migrator.
final
migrations List<Migration>
Ordered list of migrations.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

migrate({required int fromVersion, required Map<String, dynamic> payload, MigrationContext? context}) MigrationResult
Migrates payload from fromVersion to latestVersion.
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