AlterField with db_column addition should be a noop.
When I change pink = models.Integer(default=0)
to pink = models.Integer(default=0, db_column="pink")
the migration drop/create the same constraints when it is an FK or even reconstruct the table (SQLite), but nothing really changed. The constraint drop/create is a blocking operation for PostgreSQL, so it is an undesirable and unexpected behavior.
Change History
(12)
Owner: |
changed from nobody to Iuri de Silvio
|
Status: |
new → assigned
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Cc: |
Simon Charette added
|
Has patch: |
set
|
Summary: |
AlterField with only db_column changed should be a noop → AlterField with db_column addition should be a noop.
|
Triage Stage: |
Unreviewed → Accepted
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
I sent a pull request here. https://github.com/django/django/pull/13237