The command prints a message before you need to confirm the deletion that
reads:
> This list doesn't include any cascade deletions to data outside of
Django's models (uncommon).
However, a quick investigation on the objects that are to be deleted
includes objects outside of Django's scope.
In my case:
> - 2 auth.Group_permissions object(s)
> - 7185 joeflow.Task object(s)
> - 5519 joeflow.Task_parent_task_set object(s)
This misinformation can cause users to delete data without double-
checking.
--
Ticket URL: <https://code.djangoproject.com/ticket/33481>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tim Graham):
I think you've misunderstood the message. The data you listed seem to be
Django objects and relations. Why do you say they are "outside of Django's
scope"? Aren't they printed as part of the deletion warning?
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:1>
* type: Bug => Cleanup/optimization
* component: Uncategorized => Documentation
* severity: Release blocker => Normal
Comment:
Oooooh, now I get it. Wow, OK, is it just me, or is that sentence
misleading? Maybe we replace that sentence something that doesn't include
brackets at the end and not the term "Django's models"? Something a long
the lines of:
> The list above does not include deletions that may be caused by manually
added database constraints or triggers.
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:2>
* component: Documentation => contrib.contenttypes
* stage: Unreviewed => Accepted
Comment:
I wrote the original sentence in e2dfa81ff7489d97700604d634adacf1384af184.
I guess you may have interpreted "Django's models" to mean `contrib.auth`?
I don't have an objection to some rewording but for me, it's more
intuitive to talk about "cascade deletions" and "relations" rather than
"constraints or triggers." Feel free to submit a PR to continue the
discussion with a merger.
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:3>
* owner: nobody => Syed Waheed
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:4>
Comment (by Syed Waheed):
i have made the changes in the warning
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:5>
Comment (by Syed Waheed):
link to my fork - https://github.com/Waheedsys/django
link to my commit -
https://github.com/django/django/compare/main...Waheedsys:django:main
I would like to have a review of the changes
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:6>
Comment (by Mariusz Felisiak):
Replying to [comment:6 Syed Waheed]:
> link to my fork - https://github.com/Waheedsys/django
> link to my commit -
https://github.com/django/django/compare/main...Waheedsys:django:main
> I would like to have a review of the changes
Please send a patch via GitHub PR (check out
[https://docs.djangoproject.com/en/5.0/internals/contributing/writing-code
/working-with-git/#publishing-work docs] for more details).
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:7>
Comment (by Syed Waheed):
PR - https://github.com/django/django/pull/17707
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:8>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:9>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"415982be105380af5116692a2f6e91c8092803fb" 415982b]:
{{{
#!CommitTicketReference repository=""
revision="415982be105380af5116692a2f6e91c8092803fb"
Fixed #33481 -- Clarified remove_stale_contenttypes data loss warning.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33481#comment:11>