sqlreset doesn't clean up model-specific user permission record
|Reported by:||wgunadi@…||Owned by:||adrian|
|Component:||Database layer (models, ORM)||Version:|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Context: When a django user has been created with permissions to add/change/delete a model object (e.g. Poll), the information is recorded in auth_users_user_permissions table.
Problem: This record is not cleared when django-admin sqlclear or sqlreset is issued.
Symptom: This results in a database constraint error that aborted the whole transaction. Which means the database tables cannot be cleared until the permissions are removed.