#29928: TestCase doesn't check for foreign key constraints when using sqlite
-------------------------------------+-------------------------------------
Reporter: Michel Samia | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 2.1
Severity: Normal | Resolution:
Keywords: sqlite db foreign | Triage Stage: Accepted
key TestCase |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Michel Samia):
I see more possible solutions here. We can go sequentailly over them:
1. (short term) document that sqlite isn't checking foreign keys in in
tests
2. (mid-term) allow changing the checking mode for sqlite in settings.py
via and option in the database dict and document it. Mention it can cause
slowness
3. (holy grail) contribute to sqlite a simple refactor/feature which
will allow calling something like check_constraints on an uncommitted
transaction and get the integrity errors more effectively (checking only
uncommitted objects, not whole db). I guess this is the way how it works
now for postgreSQL and Oracle. I'm already thinking of filing a feature
request in sqlite for this but first I would like to hear your opinion on
it :)
--
Ticket URL: <https://code.djangoproject.com/ticket/29928#comment:7>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.bc0355ecb826cc5b26a61ab4e72830b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.