Opened 6 months ago
Last modified 3 months ago
#35487 assigned Cleanup/optimization
Removal of CASCADE in DROP COLUMN migration operation
Reported by: | Petr Přikryl | Owned by: | Petr Přikryl |
---|---|---|---|
Component: | Migrations | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Petr Přikryl, Adam Johnson | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Created based on discussion in https://forum.djangoproject.com/t/removefield-dropping-views-without-notice/31409
Arguments:
- Consistency acrocss backends. Cascade is used for postgres backend only.
- Cascade is no more needed as constraints and sequences are dropped explicitly. Next, sequences are being replaced by new identity columns.
- No side effects - unexpected removals in DB schema.
- Test suite is passing after cascade removal.
Change History (9)
comment:1 by , 6 months ago
comment:2 by , 6 months ago
Cc: | added |
---|
comment:3 by , 6 months ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
Version: | 5.0 → dev |
comment:4 by , 6 months ago
Patch needs improvement: | unset |
---|
comment:5 by , 5 months ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Marking as "needs tests" as we either should write a test or have a discussion on why it's not required in this case 👍
comment:6 by , 5 months ago
Patch needs improvement: | unset |
---|
comment:7 by , 3 months ago
Needs tests: | unset |
---|
comment:8 by , 3 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:9 by , 3 months ago
Patch needs improvement: | set |
---|
Note:
See TracTickets
for help on using tickets.
I have prepared PR: https://github.com/django/django/pull/18209