--
-- Table for storing custom fields of photos within content repository.
-- A pa_photo stores descriptive attribute information about a user
-- uploaded photo. The actually binary image files are stored using
-- associated images.
--
CREATE TABLE pa_photos (
pa_photo_id integer PRIMARY KEY NOT NULL,
caption varchar(500),
story text(-5),
user_filename varchar(250),
camera_model varchar(250),
date_taken timestamp,
flash bool,
focal_length numeric(65535, 65531),
exposure_time numeric(65535, 65531),
aperture varchar(32),
focus_distance numeric(65535, 65531),
metering varchar(100),
sha256 varchar(64),
photographer varchar(200),
ON DELETE CASCADE ON DELETE CASCADE,
CONSTRAINT pa_photo_pk REFERENCES cr_revisions (),
CONSTRAINT pa_photos_id_fk REFERENCES cr_revisions ()
);
CREATE TRIGGER RI_ConstraintTrigger_c_342779 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_342780 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
-- Table size: 24,576 bytes
-- Table rows: 245
Tables: