Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#53 closed defect (fixed) sqlclear fails with entries in auth_permissions tables

Reported by: Dobbes Owned by: adrian
Component: Tools Version:
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Running the sql output from 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.

Attachments (1)

django-admin-sqlclear.patch (748 bytes) - added by Dobbes 9 years ago.
Patch to fix the sqlclear bug

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Dobbes

Patch to fix the sqlclear bug

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [162].

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.