Opened 11 months ago

Closed 5 weeks ago

#35487 closed Cleanup/optimization (fixed)

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: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
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 (11)

comment:2 by Adam Johnson, 11 months ago

Cc: Adam Johnson added

comment:3 by Adam Johnson, 11 months ago

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 5.0dev

comment:4 by Petr Přikryl, 11 months ago

Patch needs improvement: unset

comment:5 by Sarah Boyce, 10 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 Petr Přikryl, 10 months ago

Patch needs improvement: unset

comment:7 by Petr Přikryl, 8 months ago

Needs tests: unset

comment:8 by Sarah Boyce, 8 months ago

Owner: changed from nobody to Petr Přikryl
Status: newassigned

comment:9 by Sarah Boyce, 8 months ago

Patch needs improvement: set

comment:10 by Mariusz Felisiak, 5 weeks ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 5 weeks ago

Resolution: fixed
Status: assignedclosed

In 2a5aca38:

Fixed #35487 -- Removed CASCADE from RemoveField() on PostgreSQL.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@…>
Co-authored-by: Adam Johnson <me@…>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@…>

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