]> git.sesse.net Git - pr0n/blobdiff - sql/pr0n.sql
Bump version number to 2.10.
[pr0n] / sql / pr0n.sql
index c1349e7e4e5aea9ad58c382870bf70d653c28b54..9d1f9374d3bae4e86a9fbd92dfa288d17cfb8c77 100644 (file)
@@ -2,8 +2,13 @@ CREATE TABLE events (
     id character varying NOT NULL PRIMARY KEY,
     date character varying NOT NULL,
     name character varying NOT NULL,
     id character varying NOT NULL PRIMARY KEY,
     date character varying NOT NULL,
     name character varying NOT NULL,
-    vhost character varying NOT NULL,
-    last_picture timestamp without time zone DEFAULT '1970-01-01 00:00:00'::timestamp without time zone NOT NULL
+    vhost character varying NOT NULL
+);
+
+-- In a separate table to avoid deadlocks.
+CREATE TABLE last_picture_cache ( 
+   event varchar PRIMARY KEY references events ( id ),
+   last_picture timestamp without time zone
 );
 
 CREATE TABLE images (
 );
 
 CREATE TABLE images (