testWithDataIntegrity<OldDatabase extends GeneratedDatabase, NewDatabase extends GeneratedDatabase> abstract method

Future<void> testWithDataIntegrity<OldDatabase extends GeneratedDatabase, NewDatabase extends GeneratedDatabase>({
  1. required OldDatabase createOld(
    1. QueryExecutor
    ),
  2. required NewDatabase createNew(
    1. QueryExecutor
    ),
  3. required GeneratedDatabase openTestedDatabase(
    1. QueryExecutor
    ),
  4. required void createItems(
    1. Batch,
    2. OldDatabase
    ),
  5. required Future validateItems(
    1. NewDatabase
    ),
  6. required int oldVersion,
  7. required int newVersion,
})

Utility function used by generated tests to verify that migrations modify the database schema as expected.

Foreign key constraints are disabled for this operation.

Implementation

Future<void> testWithDataIntegrity<OldDatabase extends GeneratedDatabase,
    NewDatabase extends GeneratedDatabase>({
  required OldDatabase Function(QueryExecutor) createOld,
  required NewDatabase Function(QueryExecutor) createNew,
  required GeneratedDatabase Function(QueryExecutor) openTestedDatabase,
  required void Function(Batch, OldDatabase) createItems,
  required Future Function(NewDatabase) validateItems,
  required int oldVersion,
  required int newVersion,
});