mirror of https://github.com/django/django.git
Set straight the sense of 'uppercases_column_names' feature flag
This commit is contained in:
parent
7e3cf3cfd2
commit
69337d485c
|
@ -649,7 +649,7 @@ class BaseDatabaseFeatures(object):
|
|||
# If NULL is implied on columns without needing to be explicitly specified
|
||||
implied_column_null = False
|
||||
|
||||
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