diff SQL/postgres/2016112200.sql @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SQL/postgres/2016112200.sql	Thu Jan 04 15:50:29 2018 -0500
@@ -0,0 +1,21 @@
+DROP TABLE "cache";
+DROP TABLE "cache_shared";
+
+CREATE TABLE "cache" (
+    user_id integer NOT NULL
+        REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
+    cache_key varchar(128) DEFAULT '' NOT NULL,
+    expires timestamp with time zone DEFAULT NULL,
+    data text NOT NULL,
+    PRIMARY KEY (user_id, cache_key)
+);
+
+CREATE INDEX cache_expires_idx ON "cache" (expires);
+
+CREATE TABLE "cache_shared" (
+    cache_key varchar(255) NOT NULL PRIMARY KEY,
+    expires timestamp with time zone DEFAULT NULL,
+    data text NOT NULL
+);
+
+CREATE INDEX cache_shared_expires_idx ON "cache_shared" (expires);