1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #14204 -- Enforced SQLite foreign key constraints.

Thanks Tim Graham for contributing to the patch and
Simon Charette for advice and review.
This commit is contained in:
Claude Paroz
2015-01-10 17:24:16 +01:00
committed by Tim Graham
parent 29769a9942
commit 169c3b3e07
10 changed files with 95 additions and 26 deletions

View File

@@ -1953,7 +1953,7 @@ class SchemaTests(TransactionTestCase):
editor.alter_field(model, get_field(unique=True), field, strict=True)
self.assertNotIn(constraint_name, self.get_constraints(model._meta.db_table))
if connection.features.supports_foreign_keys:
if editor.sql_create_fk:
constraint_name = "CamelCaseFKConstraint"
editor.execute(
editor.sql_create_fk % {