MigrationExecutor<T extends DatumEntityBase> class

Orchestrates the execution of schema migrations.

Constructors

MigrationExecutor({required LocalAdapter<T> localAdapter, required List<Migration> migrations, required int targetVersion, required DatumLogger logger})

Properties

hashCode int
The hash code for this object.
no setterinherited
localAdapter LocalAdapter<T>
final
logger DatumLogger
final
migrations List<Migration>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetVersion int
final

Methods

execute() Future<MigrationResult>
Executes the migration process from the adapter's stored version up to targetVersion. This method snapshots the adapter's raw data and stored schema version before attempting migrations and will restore them if any error occurs, returning a MigrationResult.
needsMigration() Future<bool>
Checks if a migration is necessary by comparing the stored version with the target version from the config.
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