select content_revision__new(:title, null, now(), 'text/plain', ' ', :item_id ) update cr_revisions set content = '[cr_create_content_file $item_id $revision_id $path]' where revision_id = :revision_id select i.storage_type, i.storage_area_key, r.mime_type, i.item_id from cr_items i, cr_revisions r where r.revision_id = :revision_id and i.item_id = r.item_id select content from cr_revisions where revision_id = :revision_id insert into cr_mime_types (mime_type) select :mime_type from dual where not exists (select 1 from cr_mime_types where mime_type = :mime_type) select content_type from cr_content_mime_type_map where mime_type = :mime_type