﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24546	Deletion of stale content types during migrate should show cascade	Aymeric Augustin	nobody	"When deleting stale content-types, the migrate command says:

{{{
The following content types are stale and need to be deleted:

    auth | group_permissions

Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
If you're unsure, answer 'no'.

    Type 'yes' to continue, or 'no' to cancel: yes
}}}

At this point, the user has no way to tell whether they should answer 'yes' or 'no'.

Usually they will type 'no' until they get bored, say a quick prayer and type 'yes'.

----

Django contains infrastructure to determine how many objects will be deleted.

{{{
>>> ct = ContentType.objects.get(app_label='auth', model='group_permissions')
>>> collector = NestedObjects(using=DEFAULT_DB_ALIAS)
>>> collector.collect([ct])
>>> print(collector.nested())
[<ContentType: group-permission relationship>]
}}}

It would be helpful to display the list of objects that will be deleted or at least the number of objects.

If the collector returns just the original object, perhaps migrate could even proceed with the deletion without asking.
"	New feature	closed	Core (Management commands)	dev	Normal	duplicate			Accepted	0	0	0	0	0	0
