Opened 10 years ago

Closed 10 years ago

#23570 closed Bug (invalid)

Schema editor drops DEFAULT from columns for backends that do support it

Reported by: Apostolis Bessas Owned by: Apostolis Bessas
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The schema editor makes a check after a SET DEFAULT is issued for a column: it seems it wants to check, if the backend does not support DEFAULTs for a column with skip_default and drop it, if so.

However, the logic is inverted.

Change History (3)

comment:1 by Apostolis Bessas, 10 years ago

Owner: changed from nobody to Apostolis Bessas
Status: newassigned

comment:3 by Tim Graham, 10 years ago

Resolution: invalid
Status: assignedclosed

The idea is that Django shouldn't leave DEFAULT values in the database (see #23043). A default is only used in the ADD COLUMN SQL so that a field can be added as non-null.

Note: See TracTickets for help on using tickets.
Back to Top