mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #30664 -- Fixed migrations crash when altering AutoField/BigAutoField with quoted db_column on PostgreSQL.
This commit is contained in:
@@ -70,7 +70,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
||||
# Make ALTER TYPE with SERIAL make sense.
|
||||
table = strip_quotes(model._meta.db_table)
|
||||
if new_type.lower() in ("serial", "bigserial"):
|
||||
column = new_field.column
|
||||
column = strip_quotes(new_field.column)
|
||||
sequence_name = "%s_%s_seq" % (table, column)
|
||||
col_type = "integer" if new_type.lower() == "serial" else "bigint"
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user