Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed name of database connection feature

  • Loading branch information...
commit dd9b3312d0a931daf21c10279cef204f04648ef9 1 parent f7a78f9
@shaib shaib authored
View
5 django/db/backends/__init__.py
@@ -520,9 +520,8 @@ class BaseDatabaseFeatures(object):
# at the end of each save operation?
supports_forward_references = True
- # Does the backend uses proper method like 'truncate_name'
- # to auto-truncate column names?
- truncates_name = False
+ # Does the backend truncate names properly when they are too long?
+ truncates_names = False
# Is there a REAL datatype in addition to floats/doubles?
has_real_datatype = False
View
2  django/db/backends/oracle/base.py
@@ -107,7 +107,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_bitwise_or = False
can_defer_constraint_checks = True
supports_partially_nullable_unique_constraints = False
- truncates_name = True
+ truncates_names = True
has_bulk_insert = True
supports_tablespaces = True
supports_sequence_reset = False
View
2  django/db/models/base.py
@@ -1479,7 +1479,7 @@ def _check_long_column_names(cls):
continue
connection = connections[db]
max_name_length = connection.ops.max_name_length()
- if max_name_length is None or connection.features.truncates_name:
+ if max_name_length is None or connection.features.truncates_names:
continue
else:
if allowed_len is None:
View
2  tests/invalid_models_tests/test_models.py
@@ -18,7 +18,7 @@ def get_max_column_name_length():
for db in settings.DATABASES.keys():
connection = connections[db]
max_name_length = connection.ops.max_name_length()
- if max_name_length is None or connection.features.truncates_name:
+ if max_name_length is None or connection.features.truncates_names:
continue
else:
if allowed_len is None:
Please sign in to comment.
Something went wrong with that request. Please try again.