mirror of https://github.com/django/django.git
[1.7.x] Set straight the sense of 'uppercases_column_names' feature flag
This commit is contained in:
parent
5f135e6a0b
commit
b8b1fbd4c1
|
@ -738,7 +738,7 @@ class BaseDatabaseFeatures(object):
|
|||
# Suffix for backends that don't support "SELECT xxx;" queries.
|
||||
bare_select_suffix = ''
|
||||
|
||||
uppercases_column_names = True
|
||||
uppercases_column_names = False
|
||||
|
||||
def __init__(self, connection):
|
||||
self.connection = connection
|
||||
|
|
|
@ -120,7 +120,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
connection_persists_old_columns = True
|
||||
closed_cursor_error_class = InterfaceError
|
||||
bare_select_suffix = " FROM DUAL"
|
||||
uppercases_column_names = False
|
||||
uppercases_column_names = True
|
||||
|
||||
|
||||
class DatabaseOperations(BaseDatabaseOperations):
|
||||
|
|
|
@ -176,7 +176,7 @@ class InspectDBTestCase(TestCase):
|
|||
out = StringIO()
|
||||
call_command('inspectdb', stdout=out)
|
||||
output = out.getvalue()
|
||||
base_name = 'field' if not connection.features.uppercases_column_names else 'Field'
|
||||
base_name = 'Field' if not connection.features.uppercases_column_names else 'field'
|
||||
self.assertIn("field = models.IntegerField()", output)
|
||||
self.assertIn("field_field = models.IntegerField(db_column='%s_')" % base_name, output)
|
||||
self.assertIn("field_field_0 = models.IntegerField(db_column='%s__')" % base_name, output)
|
||||
|
|
Loading…
Reference in New Issue