insert into ${table_name}i
(revision_id, object_type, creation_user, creation_date, creation_ip, title, description, item_id, text, mime_type $addtnl_properties)
values (:revision_id, :content_type, :creation_user_id, now(), :creation_ip, :title, :description, :item_id, :content, :mime_type $addtnl_values)
insert into ${table_name}i
(object_type, creation_user, creation_date, creation_ip, title, description, item_id, revision_id, text, mime_type $addtnl_properties)
values (:content_type, :creation_user_id, now(), :creation_ip, :title, :description, :item_id, :revision_id, :content, :mime_type $addtnl_values)
select 1
from cr_mime_types
where mime_type = :mime_type
update cr_revisions
set content_length = :tmp_filesize
where revision_id = :revision_id
select i.item_id, i.name, i.parent_id, r.title, r.description, r.content,
i.content_type, i.publish_status, i.live_revision, i.latest_revision, i.storage_type $addtnl_select
from cr_revisions r, cr_items i $addtnl_from
where r.revision_id = :revision_id
and i.item_id = r.item_id $addtnl_where
update cr_revisions set $update_string
where revision_id = :revision_id