#30054: SQLite doesn't implement cascading flush and breaks available_apps 
feature.
-------------------------------------+-------------------------------------
               Reporter:  Simon      |          Owner:  Simon Charette
  Charette                           |
                   Type:  Bug        |         Status:  assigned
              Component:  Testing    |        Version:  master
  framework                          |
               Severity:  Normal     |       Keywords:
           Triage Stage:  Accepted   |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 #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

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30054>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.9db7d326ce3604362d8cae79888f8316%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to