diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2016-07-07 05:09:42 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-07-07 08:09:42 -0400 |
| commit | 34108204603b39b3e4e58cb46012736a4986e6d8 (patch) | |
| tree | e44833ea1bede6b475962bedd772cb509eea00f0 /django | |
| parent | f7e907115fef94e890a0a5b706ebdfb60eb363d4 (diff) | |
Fixed #26833 -- Fixed SchemaEditor._constraint_names() to handle features.uppercases_column_names.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/base/schema.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/db/backends/base/schema.py b/django/db/backends/base/schema.py index fc2120899d..44e598f92e 100644 --- a/django/db/backends/base/schema.py +++ b/django/db/backends/base/schema.py @@ -941,7 +941,11 @@ class BaseDatabaseSchemaEditor(object): """ Returns all constraint names matching the columns and conditions """ - column_names = list(column_names) if column_names else None + if column_names is not None: + column_names = [ + self.connection.introspection.column_name_converter(name) + for name in column_names + ] with self.connection.cursor() as cursor: constraints = self.connection.introspection.get_constraints(cursor, model._meta.db_table) result = [] |
