mirror of
https://github.com/django/django.git
synced 2024-12-24 18:16:19 +00:00
[1.7.x] Fixed #22498 -- constraint name was not quoted in FK creation SQL
Backport of 843613add4
from master
This commit is contained in:
parent
7421e1e320
commit
b8b179bbf5
@ -419,11 +419,11 @@ class BaseDatabaseSchemaEditor(object):
|
||||
to_column = field.rel.to._meta.get_field(field.rel.field_name).column
|
||||
self.deferred_sql.append(
|
||||
self.sql_create_fk % {
|
||||
"name": '%s_refs_%s_%x' % (
|
||||
"name": self.quote_name('%s_refs_%s_%x' % (
|
||||
field.column,
|
||||
to_column,
|
||||
abs(hash((model._meta.db_table, to_table)))
|
||||
),
|
||||
)),
|
||||
"table": self.quote_name(model._meta.db_table),
|
||||
"column": self.quote_name(field.column),
|
||||
"to_table": self.quote_name(to_table),
|
||||
|
Loading…
Reference in New Issue
Block a user