[ckan-dev] Purge Fail

Konrad Reiche konrad.reiche at gmail.com
Mon Apr 29 09:11:27 UTC 2013


Hello everyone,

could someone tell me, whether the ticket
http://trac.ckan.org/ticket/2530is still relevant? Using CKAN 1.8 this
is definitely a problem. I cannot
purge all datasets and I believe this happens on resources which have been
modified where new revisions are created.

The following SQL DELETE Query works around the problem. Which means, if I
execute it beforehand, I can purge without exceptions:

DELETE FROM resource_revision rr
WHERE rr.resource_group_id IN (
     SELECT rg.id FROM resource_group rg
     WHERE rg.package_id IN (
          SELECT p.id FROM package p WHERE p.state = 'deleted'
     )
)

For what are the tables resource_revision and resource_group used. Is that
query save to execute in order to fix the problem? To my mind yes.

Best,
Konrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130429/c8ebea41/attachment.html>


More information about the ckan-dev mailing list