"date" character varying NOT NULL,
name character varying NOT NULL,
vhost character varying NOT NULL,
- last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (vhost, event)
);
vhost varchar NOT NULL,
event varchar NOT NULL,
last_picture timestamp without time zone,
+ last_update timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (vhost,event),
- FOREIGN KEY (vhost,event) REFERNECES events(vhost,event)
+ FOREIGN KEY (vhost,event) REFERENCES events(vhost,event)
);
CREATE TABLE images (
vhost character varying NOT NULL,
event character varying NOT NULL,
filename character varying NOT NULL,
- width integer DEFAULT -1 NOT NULL,
- height integer DEFAULT -1 NOT NULL,
+ width integer,
+ height integer,
uploadedby character varying NOT NULL,
"date" timestamp without time zone,
takenby character varying NOT NULL,
selected boolean DEFAULT false,
+ model character varying,
+ lens character varying,
FOREIGN KEY (vhost,event) REFERENCES events (vhost,event)
);
vhost character varying,
event character varying NOT NULL,
filename character varying NOT NULL,
- width integer DEFAULT -1 NOT NULL,
- height integer DEFAULT -1 NOT NULL,
+ width integer,
+ height integer,
uploadedby character varying,
"date" timestamp without time zone,
takenby character varying NOT NULL,
- selected boolean
+ selected boolean,
+ model character varying,
+ lens character varying
);
CREATE TABLE fake_files (
vhost character varying NOT NULL
);
+-- Mainly used for manual queries -- usually too slow to be very useful
+-- for web views in the long run.
CREATE TABLE exif_info (
image integer NOT NULL REFERENCES images (id) ON DELETE CASCADE,
key varchar NOT NULL,