From 3e48d2eee1d2af42aa777fd5e461fa570762732e Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 21 Nov 2008 18:19:30 +0000
Subject: - Increase speed of session destroy and garbage clean up - Fix
 session timeout when DB server got clock skew (#1485490)

---
 SQL/postgres.update.sql | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'SQL/postgres.update.sql')

diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql
index fdd7f0f5e..f9cd431b6 100644
--- a/SQL/postgres.update.sql
+++ b/SQL/postgres.update.sql
@@ -25,5 +25,7 @@ CREATE INDEX messages_created_idx ON messages (created);
 -- Updates from version 0.2-beta
 
 ALTER TABLE cache DROP CONSTRAINT cache_session_id_fkey;
-ALTER TABLE cache ADD FOREIGN KEY (session_id) REFERENCES session(sess_id) ON DELETE CASCADE ON UPDATE CASCADE;
-CREATE INDEX cache_session_id_idx ON "cache" (session_id);
+ALTER TABLE cache ADD FOREIGN KEY (session_id) REFERENCES session (sess_id) ON DELETE CASCADE ON UPDATE CASCADE;
+
+CREATE INDEX cache_session_id_idx ON cache (session_id);
+CREATE INDEX session_changed_idx ON session (changed);
-- 
cgit v1.2.3

