mirror of https://github.com/django/django.git
Fixed #22498 -- constraint name was not quoted in FK creation SQL
This commit is contained in:
parent
53d97e4fe3
commit
843613add4
|
@ -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