mirror of
https://github.com/django/django.git
synced 2024-12-24 01:55:49 +00:00
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
Block a user