diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-05-10 14:40:42 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-05-10 14:55:22 +0200 |
| commit | c54fb3d922fdcd00c4e17676fe4cdaa3a3f6f6d8 (patch) | |
| tree | 88e6edda8c6298f3eba44032e11010ba8c8f5e83 /django | |
| parent | 0c198035e958a3caa0bd1e0fd9f419bf1308399d (diff) | |
[1.7.x] Adjusted refactoring of vendor checks.
Thanks Shai for the thorough review.
Backport of fb90b7c from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/__init__.py | 7 | ||||
| -rw-r--r-- | django/db/backends/mysql/base.py | 2 | ||||
| -rw-r--r-- | django/db/backends/oracle/base.py | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py index 1f223ed8a3..3ad1440bda 100644 --- a/django/db/backends/__init__.py +++ b/django/db/backends/__init__.py @@ -616,8 +616,6 @@ class BaseDatabaseFeatures(object): supports_subqueries_in_group_by = True supports_bitwise_or = True - supports_boolean_type = True - supports_binary_field = True # Do time/datetime fields have microsecond precision? @@ -679,6 +677,9 @@ class BaseDatabaseFeatures(object): # Can the backend introspect an BinaryField, instead of an TextField? can_introspect_binary_field = True + # Can the backend introspect an BooleanField, instead of an IntegerField? + can_introspect_boolean_field = True + # Can the backend introspect an IPAddressField, instead of an CharField? can_introspect_ip_address_field = False @@ -737,7 +738,7 @@ class BaseDatabaseFeatures(object): # Suffix for backends that don't support "SELECT xxx;" queries. bare_select_suffix = '' - lowercases_column_names = False + uppercases_column_names = True def __init__(self, connection): self.connection = connection diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 3c71c5792c..9172d7069a 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -172,13 +172,13 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_update_nowait = False supports_forward_references = False supports_long_model_names = False - supports_boolean_type = False # XXX MySQL DB-API drivers currently fail on binary data on Python 3. supports_binary_field = six.PY2 supports_microsecond_precision = False supports_regex_backreferencing = False supports_date_lookup_using_string = False can_introspect_binary_field = False + can_introspect_boolean_field = False supports_timezones = False requires_explicit_null_ordering_when_grouping = True allows_auto_pk_0 = False diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 312eb7e40b..f945b26101 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -120,7 +120,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): connection_persists_old_columns = True closed_cursor_error_class = InterfaceError bare_select_suffix = " FROM DUAL" - lowercases_column_names = True + uppercases_column_names = False class DatabaseOperations(BaseDatabaseOperations): |
