#14204: Take advantage of SQLite support for FK constraints -------------------------------------+------------------------------------- Reporter: ramiro | Owner: claudep Type: New feature | Status: assigned Component: Database layer | Version: master (models, ORM) | Severity: Normal | Resolution: Keywords: sqlite, foreign key | Triage Stage: Accepted Has patch: 1 | Needs documentation: 1 Needs tests: 1 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by claudep): There is one major issue with supporting FK constraints on SQLite3: they can only be deactivated outside a transaction (this is a documented behavior). Take for example the Django TestCase implementation which wraps every test class inside a transaction, that means that foreign keys checking can never be deactivated inside TestCase tests (loading forward references in fixtures is problematic for example, as does `fixtures_regress.tests.TestFixtures.test_loaddata_works_when_fixture_has_forward_refs`). WIP work in this commit: https://github.com/claudep/django/commit/e7a9252aa6f990c4687656e9ea0f1d1ca70dc043 -- Ticket URL: <https://code.djangoproject.com/ticket/14204#comment:18> 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/064.b92a5e1c67c2b62a34add6a6ba7893f5%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.