mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #5242 -- Fixed table processing for some databases with case insensitive tables. Patch from Filip Wasilewski.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -38,13 +38,13 @@ class Command(NoArgsCommand):
|
||||
|
||||
cursor = connection.cursor()
|
||||
|
||||
# Get a list of all existing database tables,
|
||||
# so we know what needs to be added.
|
||||
tables = table_list()
|
||||
if connection.features.uses_case_insensitive_names:
|
||||
table_name_converter = str.upper
|
||||
else:
|
||||
table_name_converter = lambda x: x
|
||||
# Get a list of all existing database tables, so we know what needs to
|
||||
# be added.
|
||||
tables = [table_name_converter(name) for name in table_list()]
|
||||
|
||||
# Get a list of already installed *models* so that references work right.
|
||||
seen_models = installed_models(tables)
|
||||
|
||||
Reference in New Issue
Block a user