mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Fixed #33919 -- Fixed adding AutoFields on PostgreSQL.
Thanks Jack Calvin Brown for the report. Regression in2eea361eff. Backport of5c803bc070from main
This commit is contained in:
@@ -637,6 +637,8 @@ class BaseDatabaseSchemaEditor:
|
||||
# It might not actually have a column behind it
|
||||
if definition is None:
|
||||
return
|
||||
if col_type_suffix := field.db_type_suffix(connection=self.connection):
|
||||
definition += f" {col_type_suffix}"
|
||||
# Check constraints can go on the column SQL here
|
||||
db_params = field.db_parameters(connection=self.connection)
|
||||
if db_params["check"]:
|
||||
|
||||
Reference in New Issue
Block a user