OnDatabaseVersionChangeFn typedef

OnDatabaseVersionChangeFn = FutureOr<void> Function(Database db, int oldVersion, 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);