Opened 5 years ago

Closed 5 years ago

#31213 closed Uncategorized (duplicate)

Add flag to remove_stale_contenttypes to remove entries for nonexistent apps.

Reported by: Gowtham Kommineni Owned by: nobody
Component: contrib.contenttypes Version: 3.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

remove_stale_contenttypes only removes stale content types for stale models in installed apps. It doesn't remove stale content types whose app was either removed or renamed.

Creating this ticket as per the discussion on https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/django-developers/content%7Csort:date/django-developers/0WrbU_Kc2Z0/3iRmkpLYCgAJ.

To avoid data loss, add a flag in the management command to get everyone on board. The flag being off by default and only turns on if you know what you’re doing and enable it. At any rate i believe from what i can i see in the code it will still prompt you to delete the items it finds unless you added the ——no—input which prevents helps with data loss.

Change History (1)

comment:1 by Mariusz Felisiak, 5 years ago

Resolution: duplicate
Status: newclosed

We don't need a new ticket, I accepted the first ticket.

Duplicate of #31123.

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