testWithDataIntegrity<OldDatabase extends GeneratedDatabase, NewDatabase extends GeneratedDatabase> abstract method
Future<void>
testWithDataIntegrity<OldDatabase extends GeneratedDatabase, NewDatabase extends GeneratedDatabase>({
- required OldDatabase createOld(
- QueryExecutor
- required NewDatabase createNew(
- QueryExecutor
- required GeneratedDatabase openTestedDatabase(
- QueryExecutor
- required void createItems(
- Batch,
- OldDatabase
- required Future validateItems(
- NewDatabase
- required int oldVersion,
- 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,
});