[Django] #35487: Removal of CASCADE in DROP COLUMN migration operation

20 views
Skip to first unread message

Django

unread,
May 29, 2024, 5:08:28 AMMay 29
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-----------------------------------------+------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/35487>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 29, 2024, 5:31:32 AMMay 29
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-------------------------------+--------------------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Petr Přikryl):

I have prepared PR: https://github.com/django/django/pull/18209
--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:1>

Django

unread,
May 29, 2024, 6:10:08 AMMay 29
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-------------------------------+--------------------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Adam Johnson):

* cc: Adam Johnson (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:2>

Django

unread,
May 29, 2024, 6:16:57 AMMay 29
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
--------------------------------------+------------------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Adam Johnson):

* has_patch: 0 => 1
* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization
* version: 5.0 => dev

--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:3>

Django

unread,
May 30, 2024, 4:47:10 PMMay 30
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
--------------------------------------+------------------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Petr Přikryl):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:4>

Django

unread,
Jun 13, 2024, 3:08:51 AMJun 13
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
--------------------------------------+------------------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1

Comment:

Marking as "needs tests" as we either should write a test or have a
discussion on why it's not required in this case 👍
--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:5>

Django

unread,
Jun 26, 2024, 4:22:38 AM (3 days ago) Jun 26
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
--------------------------------------+------------------------------------
Reporter: Petr Přikryl | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Petr Přikryl):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:6>
Reply all
Reply to author
Forward
0 new messages