Opened 11 months ago
Closed 11 months ago
#35123 closed New feature (wontfix)
Migrate prune for apps that are deleted
Reported by: | Moein Bbp | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 4.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If we delete an app based on this guideline: https://docs.djangoproject.com/en/4.2/howto/delete-app/ , so there is no possibility to use prune command for removing stale migration records from django_migrations
table for a deleted app.
because we already removed the app from INSTALLED_APPS
.
CommandError: No installed app with label 'xyz'.
Change History (2)
comment:1 by , 11 months ago
Summary: | Migrate prune apps that are deleted → Migrate prune for apps that are deleted |
---|
comment:2 by , 11 months ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Pruning migrations for removed apps is not really important. On the contrary, personally, I'd prefer to keep them. If you really want to do this you can always use
--prune
before removing an app fromINSTALLED_APPS
. Generally, management commands (and probably any other components) don't support operations on removed apps (exceptremove_stale_contenttypes --include-stale-apps
but it's a different story). It's not worth adding complexity.