mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[5.0.x] Fixed #35329 -- Fixed migrations crash when adding partial unique constraints with nulls_distinct.
Bug in595a2abb58. Thanks Lucas Lemke Saunitti for the report. Backport ofb98271a6e4from main
This commit is contained in:
@@ -129,7 +129,7 @@ class BaseDatabaseSchemaEditor:
|
||||
)
|
||||
sql_create_unique_index = (
|
||||
"CREATE UNIQUE INDEX %(name)s ON %(table)s "
|
||||
"(%(columns)s)%(include)s%(condition)s%(nulls_distinct)s"
|
||||
"(%(columns)s)%(include)s%(nulls_distinct)s%(condition)s"
|
||||
)
|
||||
sql_rename_index = "ALTER INDEX %(old_name)s RENAME TO %(new_name)s"
|
||||
sql_delete_index = "DROP INDEX %(name)s"
|
||||
|
||||
Reference in New Issue
Block a user