The filerevision views should have the same data available as the existing image and oldimage views instead of only including fr_deleted = 0. This information is also available via the web UI and action API.
Current:
filerevision: source: filerevision view: select fr_id, fr_file, fr_size, fr_width, fr_height, fr_metadata, fr_bits, fr_description_id, fr_actor, fr_timestamp, fr_sha1, fr_archive_name, fr_deleted where: > fr_deleted = 0
Proposed:
filerevision: source: filerevision view: > select fr_id, fr_file, fr_size, fr_width, fr_height, fr_metadata, fr_bits, if(fr_deleted&2,0,fr_description_id) as fr_description_id, if(fr_deleted&4,null,fr_actor) as fr_actor, fr_timestamp, fr_sha1, fr_archive_name, fr_deleted filerevision_userindex: source: filerevision view: > select fr_id, fr_file, fr_size, fr_width, fr_height, fr_metadata, fr_bits, if(fr_deleted&2,0,fr_description_id) as fr_description_id, fr_actor, fr_timestamp, fr_sha1, fr_archive_name, fr_deleted where: (fr_deleted&4)=0
Reference:
image: source: image view: > select img_name, img_size, img_width, img_height, img_metadata, img_bits, img_media_type, img_major_mime, img_minor_mime, coalesce(img_description_id,0) as img_description_id, img_actor, img_timestamp, img_sha1 [...] oldimage: source: oldimage view: > select oi_name, oi_archive_name, oi_size, oi_width, oi_height, oi_bits, if(oi_deleted&2,0,oi_description_id) as oi_description_id, if(oi_deleted&4,null,oi_actor) as oi_actor, oi_timestamp, oi_metadata, oi_media_type, oi_major_mime, oi_minor_mime, oi_deleted, oi_sha1 [...] oldimage_userindex: source: oldimage view: > select oi_name, oi_archive_name, oi_size, oi_width, oi_height, oi_bits, if(oi_deleted&2,0,oi_description_id) as oi_description_id, oi_actor, oi_timestamp, oi_metadata, oi_media_type, oi_major_mime, oi_minor_mime, oi_deleted, oi_sha1 where: (oi_deleted&4)=0