]> git.sesse.net Git - pr0n/blobdiff - sql/pr0n.sql
Implement support for HTTP digest authentication (RFC2617).
[pr0n] / sql / pr0n.sql
index 318e9da0463fc271494887dcd8189652e5fb0587..c8901e2a7eaba02b07ab96a3a7759c1632f273df 100644 (file)
@@ -3,7 +3,6 @@ CREATE TABLE events (
     "date" character varying NOT NULL,
     name character varying NOT NULL,
     vhost character varying NOT NULL,
     "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)
 );
 
     PRIMARY KEY (vhost, event)
 );
@@ -13,9 +12,10 @@ CREATE TABLE last_picture_cache (
    vhost varchar NOT NULL,
    event varchar NOT NULL,
    last_picture timestamp without time zone,
    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),
 
    PRIMARY KEY (vhost,event),
-   FOREIGN KEY (vhost,event) REFERNECES events(vhost,event)
+   FOREIGN KEY (vhost,event) REFERENCES events(vhost,event)
 );
 
 CREATE TABLE images (
 );
 
 CREATE TABLE images (
@@ -72,7 +72,8 @@ CREATE TABLE shadow_files (
 CREATE TABLE users (
     username character varying NOT NULL,
     sha1password character(28) NOT NULL,
 CREATE TABLE users (
     username character varying NOT NULL,
     sha1password character(28) NOT NULL,
-    vhost character varying NOT NULL
+    vhost character varying NOT NULL,
+    digest_ha1_hex character(32)
 );
 
 -- Mainly used for manual queries -- usually too slow to be very useful
 );
 
 -- Mainly used for manual queries -- usually too slow to be very useful