migrate method
Applies the migrations from the source
.
Implementation
Future<void> migrate(MigrationSource source) async {
String? current = await _gateway.currentVersion();
await for (final migration in source.read(afterVersion: current)) {
final next = migration.version;
if (current != null) _enforceOrder(current, next);
await _gateway.apply(migration);
current = next;
}
}