MigrationStepWithVersion typedef

MigrationStepWithVersion = Future<int> Function(int currentVersion, GeneratedDatabase database)

Signature of a function, typically generated by drift, that runs a single migration step with a given currentVersion and the database.

Returns the schema version code that the function migrates to.

Implementation

typedef MigrationStepWithVersion = Future<int> Function(
  int currentVersion,
  GeneratedDatabase database,
);