id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 30054 SQLite doesn't implement cascading flush and breaks available_apps feature. Simon Charette Simon Charette "#30033 started performing constraint checks on schema alteration commits on SQLite and uncovered a data integrity issue of our SQLite backend flushing of data. When `TransactionTestCase.available_apps` is specfied only the specified apps subset of tested model tables are flushed for performance reasons. Thing is when this happens all rows referring to ''flushed'' table rows must also be flushed as specified by the `DatabaseOperations.sql_flush(allow_cascade)` flag that SQLite completely ignores. This issue has been around since foreign keys were enabled on SQLite because `execute_sql_flush` happens to disable constraint checks and allow foreign key integrity to be silently broken. In order to address this issue `sql_flush` must consider `allow_cascade` and `execute_sql_flush` should stop disabling constraints. More context from https://github.com/django/django/pull/10779#issuecomment-449483709" Bug closed Testing framework dev Normal fixed Accepted 1 0 0 0 0 0