djonga-admin.py sqlclear fails with entries in auth_permissions tables
|Reported by:||Dobbes||Owned by:||Adrian Holovaty|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Running the sql output from djonga-admin.py sqlclear blog
DELETE from content_types WHERE package = 'blog';
DELETE FROM packages WHERE label = 'blog';
DROP TABLE blog_entries;
Returns the following error:
ERROR: update or delete on "packages" violates foreign key constraint "auth_permissions_package_fkey" on "auth_permissions"
DETAIL: Key (label)=(blog) is still referenced from table "auth_permissions".
This is pretty much what it says that there are still fields in the auth_permissions table that reference the blog package, so it can't be deleted. I created the simple patch for it and will attach.