Opened 4 years ago

Last modified 4 years ago

#31826 closed Cleanup/optimization

AlterField with only db_column changed should be a noop — at Version 4

Reported by: Iuri de Silvio Owned by: Iuri de Silvio
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Simon Charette Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Iuri de Silvio)

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 (4)

comment:1 by Iuri de Silvio, 4 years ago

Last edited 4 years ago by Iuri de Silvio (previous) (diff)

comment:2 by Iuri de Silvio, 4 years ago

Owner: changed from nobody to Iuri de Silvio
Status: newassigned

comment:3 by Iuri de Silvio, 4 years ago

Description: modified (diff)

comment:4 by Iuri de Silvio, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top