select item_id
from cr_revisions
where revision_id = :version_id
delete from acs_permissions where object_id = :version_id
select i.name as title, r.title as version_name
from cr_items i, cr_revisions r
where i.item_id = r.item_id
and r.revision_id = :version_id