MigrationConnection typedef

MigrationConnection = FutureOr<SqlDatabase<Backend>> Function({required bool readOnly})

Opens a runtime owned and closed by one migration CLI invocation.

The factory must honor readOnly when requested and connect to the engine declared by the migration history. Do not return a shared application runtime.

Implementation

typedef MigrationConnection = FutureOr<SqlDatabase<Backend>> Function({
  required bool readOnly,
});