select object_id_two
from acs_rels
where object_id_one = :user_id
and rel_type = 'user_portrait_rel'
select object_id
from acs_objects
where object_type in ('cr_item_child_rel','image')
and context_id = :item_id
and object_id not in (select live_revision from cr_items where item_id = :item_id)
select object_id
from acs_objects
where object_type = 'content_item'
and context_id = :item_id
delete from acs_rels
where object_id_two = :item_id
and object_id_one = :user_id
and rel_type = 'user_portrait_rel'