summaryrefslogtreecommitdiff
path: root/roundcubemail/SQL/postgres.update.sql
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-21 14:33:58 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-21 14:33:58 +0000
commitc8fb75d8b8c4b52b2460e71b91146cbcb579410a (patch)
tree01fd7db910d680634656b5691e9796538f1b1ceb /roundcubemail/SQL/postgres.update.sql
parent685b4ae56fe7da703f3dd8e7de692ec08b34ff7c (diff)
- Fix 'cache' table cleanup on session destroy (#1485516)
git-svn-id: https://svn.roundcube.net/trunk@2075 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/SQL/postgres.update.sql')
-rw-r--r--roundcubemail/SQL/postgres.update.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/roundcubemail/SQL/postgres.update.sql b/roundcubemail/SQL/postgres.update.sql
index dfc282b4a..fdd7f0f5e 100644
--- a/roundcubemail/SQL/postgres.update.sql
+++ b/roundcubemail/SQL/postgres.update.sql
@@ -21,3 +21,9 @@ ALTER TABLE cache ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE
-- Updates from version 0.2-alpha
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);