onDatabaseVersionChangeError function

Future<void> onDatabaseVersionChangeError(
  1. Database db,
  2. int oldVersion,
  3. int newVersion
)

to specify during openDatabase for onDowngrade Downgrading will always fail

Implementation

Future<void> onDatabaseVersionChangeError(
    Database db, int oldVersion, int newVersion) async {
  throw ArgumentError("can't change version from $oldVersion to $newVersion");
}