OnDatabaseVersionChangeFn typedef

FutureOr<void> OnDatabaseVersionChangeFn (
  1. Database db,
  2. int oldVersion,
  3. int newVersion
)

Prototype of the function called when the version has changed.

Schema migration (adding column, adding table, adding trigger...) should happen here.

Implementation

typedef OnDatabaseVersionChangeFn = FutureOr<void> Function(
    Database db, int oldVersion, int newVersion);