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

45 views
Skip to first unread message

Django

unread,
May 29, 2024, 5:08:28 AM5/29/24
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 AM5/29/24
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 AM5/29/24
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 AM5/29/24
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 PM5/30/24
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 AM6/13/24
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 AM6/26/24
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>

Django

unread,
Aug 15, 2024, 7:06:12 AM8/15/24
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_tests: 1 => 0

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

Django

unread,
Aug 20, 2024, 3:06:40 AM8/20/24
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-------------------------------------+-------------------------------------
Reporter: Petr Přikryl | Owner: Petr
Type: | Přikryl
Cleanup/optimization | Status: assigned
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 Sarah Boyce):

* owner: nobody => Petr Přikryl
* status: new => assigned

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

Django

unread,
Aug 20, 2024, 5:01:03 AM8/20/24
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-------------------------------------+-------------------------------------
Reporter: Petr Přikryl | Owner: Petr
Type: | Přikryl
Cleanup/optimization | Status: assigned
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 Sarah Boyce):

* needs_better_patch: 0 => 1

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

Django

unread,
Mar 8, 2025, 1:50:44 PM3/8/25
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-------------------------------------+-------------------------------------
Reporter: Petr Přikryl | Owner: Petr
Type: | Přikryl
Cleanup/optimization | Status: assigned
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

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

Django

unread,
Mar 9, 2025, 11:02:30 AM3/9/25
to django-...@googlegroups.com
#35487: Removal of CASCADE in DROP COLUMN migration operation
-------------------------------------+-------------------------------------
Reporter: Petr Přikryl | Owner: Petr
Type: | Přikryl
Cleanup/optimization | Status: closed
Component: Migrations | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"2a5aca38bbb37f6e7590ac6e68912bfbefb17dae" 2a5aca38]:
{{{#!CommitTicketReference repository=""
revision="2a5aca38bbb37f6e7590ac6e68912bfbefb17dae"
Fixed #35487 -- Removed CASCADE from RemoveField() on PostgreSQL.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
Co-authored-by: Adam Johnson <m...@adamj.eu>
Co-authored-by: Sarah Boyce <42296566+...@users.noreply.github.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35487#comment:11>
Reply all
Reply to author
Forward
0 new messages