1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[4.1.x] Fixed #33932 -- Fixed altering AutoFields to OneToOneField on PostgreSQL.

Regression in 2eea361eff.

Backport of e3cb8bcb7d from main
This commit is contained in:
Benoît Vinot
2022-08-17 13:19:16 +02:00
committed by Mariusz Felisiak
parent bee09df39f
commit 85942cf669
3 changed files with 31 additions and 1 deletions

View File

@@ -164,7 +164,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
self.sql_drop_indentity
% {
"table": self.quote_name(table),
"column": self.quote_name(strip_quotes(old_field.column)),
"column": self.quote_name(strip_quotes(new_field.column)),
}
)
column = strip_quotes(new_field.column)