summaryrefslogtreecommitdiff
path: root/django/db/backends
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-30 04:46:59 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-30 04:46:59 +0000
commitf9df4d1435fd3382fdcc06f75c1c8d62bfe78ec6 (patch)
tree1ed84020b3c2111537b7231d4e42a83cba7be776 /django/db/backends
parentb0bc8b9dfd6069e53cd73c1d3411f995a05f0a5a (diff)
Make sure we only create the minimum number of table indexes for MySQL.
This patch simplifies a bunch of code for all backends and removes some duplicate index creation for MySQL, in particular (versions 4.x and later). Patch from Nis Jørgensen. Fixed #5671, #5680, #7170, #7186. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends')
-rw-r--r--django/db/backends/__init__.py2
-rw-r--r--django/db/backends/mysql/base.py1
-rw-r--r--django/db/backends/mysql_old/base.py1
-rw-r--r--django/db/backends/oracle/base.py1
4 files changed, 0 insertions, 5 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 7a4e46a7d7..36a2339638 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -41,8 +41,6 @@ class BaseDatabaseWrapper(local):
class BaseDatabaseFeatures(object):
allows_group_by_ordinal = True
- allows_unique_and_pk = True
- autoindexes_primary_keys = True
inline_fk_references = True
needs_datetime_string_cast = True
supports_constraints = True
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 23735a023b..cfa6b0e56c 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -60,7 +60,6 @@ server_version_re = re.compile(r'(\d{1,2})\.(\d{1,2})\.(\d{1,2})')
# TRADITIONAL will automatically cause most warnings to be treated as errors.
class DatabaseFeatures(BaseDatabaseFeatures):
- autoindexes_primary_keys = False
inline_fk_references = False
empty_fetchmany_value = ()
update_can_self_select = False
diff --git a/django/db/backends/mysql_old/base.py b/django/db/backends/mysql_old/base.py
index e57aee6a04..adfa03d569 100644
--- a/django/db/backends/mysql_old/base.py
+++ b/django/db/backends/mysql_old/base.py
@@ -64,7 +64,6 @@ class MysqlDebugWrapper:
return getattr(self.cursor, attr)
class DatabaseFeatures(BaseDatabaseFeatures):
- autoindexes_primary_keys = False
inline_fk_references = False
empty_fetchmany_value = ()
update_can_self_select = False
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 1df6bac069..54517662c1 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -24,7 +24,6 @@ IntegrityError = Database.IntegrityError
class DatabaseFeatures(BaseDatabaseFeatures):
allows_group_by_ordinal = False
- allows_unique_and_pk = False # Suppress UNIQUE/PK for Oracle (ORA-02259)
empty_fetchmany_value = ()
needs_datetime_string_cast = False
supports_tablespaces = True