upgrade method

  1. @override
Future<void> upgrade(
  1. String fromVersion,
  2. Migration migration
)
override

Applies the migration if the current version is fromVersion. If the current DB version is not fromVersion, this method MUST throw an exception. All migration statements MUST be executed in a single transaction.

Implementation

@override
Future<void> upgrade(String fromVersion, Migration migration) async {
  appliedMigrations.add(migration);
}