]> git.sesse.net Git - pr0n/blobdiff - sql/pr0n.sql
Keep JPEGs in the YCbCr colorspace instead of going between YCbCr and RGB
[pr0n] / sql / pr0n.sql
index 0bca09ae79eb41c16ad6231f1c2bc06416171962..7ce156a30a4ad2f7912f366414d68ee11b5d213c 100644 (file)
@@ -15,7 +15,7 @@ CREATE TABLE last_picture_cache (
    last_picture timestamp without time zone,
 
    PRIMARY KEY (vhost,event),
-   FOREIGN KEY (vhost,event) REFERNECES events(vhost,event)
+   FOREIGN KEY (vhost,event) REFERENCES events(vhost,event)
 );
 
 CREATE TABLE images (
@@ -23,12 +23,14 @@ 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)
 );
@@ -39,12 +41,14 @@ CREATE TABLE deleted_images (
     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 (
@@ -71,6 +75,8 @@ CREATE TABLE users (
     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,