summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-06-16 19:25:13 -0400
committerTim Graham <timograham@gmail.com>2014-06-16 19:25:58 -0400
commitdc7d0f50e22bc52bc4656879452c482394347b75 (patch)
tree9c8627aab2e469311fa75344db0df4b40658e51c
parent7f095ea74419cda5534b0cc9fbedc41f84f41318 (diff)
[1.7.x] Renamed DatabaseFeature.supports_check_constraints to supports_column_check_constraints.
Thanks maxi for the suggestion. Backport of 82c935d44c from master
-rw-r--r--django/db/backends/__init__.py2
-rw-r--r--django/db/backends/mysql/base.py2
-rw-r--r--django/db/backends/sqlite3/base.py2
-rw-r--r--tests/schema/tests.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 93b74896a0..5636b56d14 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -724,7 +724,7 @@ class BaseDatabaseFeatures(object):
supports_foreign_keys = True
# Does it support CHECK constraints?
- supports_check_constraints = True
+ supports_column_check_constraints = True
# Does the backend support 'pyformat' style ("... %(name)s ...", {'name': value})
# parameter passing? Note this can be provided by the backend even if not
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 9172d7069a..697a35a1dd 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -184,7 +184,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
allows_auto_pk_0 = False
uses_savepoints = True
atomic_transactions = False
- supports_check_constraints = False
+ supports_column_check_constraints = False
def __init__(self, connection):
super(DatabaseFeatures, self).__init__(connection)
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index e43ea328bf..551c60759f 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -103,7 +103,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
has_bulk_insert = True
can_combine_inserts_with_and_without_auto_increment_pk = False
supports_foreign_keys = False
- supports_check_constraints = False
+ supports_column_check_constraints = False
autocommits_when_autocommit_is_off = True
can_introspect_decimal_field = False
can_introspect_positive_integer_field = True
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index b0dd9ada90..624ada5276 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -478,7 +478,7 @@ class SchemaTests(TransactionTestCase):
BookWithM2M._meta.local_many_to_many.remove(new_field)
del BookWithM2M._meta._m2m_cache
- @unittest.skipUnless(connection.features.supports_check_constraints, "No check constraints")
+ @unittest.skipUnless(connection.features.supports_column_check_constraints, "No check constraints")
def test_check_constraints(self):
"""
Tests creating/deleting CHECK constraints