From c8fb75d8b8c4b52b2460e71b91146cbcb579410a Mon Sep 17 00:00:00 2001
From: alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>
Date: Fri, 21 Nov 2008 14:33:58 +0000
Subject: - Fix 'cache' table cleanup on session destroy (#1485516)

git-svn-id: https://svn.roundcube.net/trunk@2075 208e9e7b-5314-0410-a742-e7e81cd9613c
---
 roundcubemail/SQL/mysql5.initial.sql | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'roundcubemail/SQL/mysql5.initial.sql')

diff --git a/roundcubemail/SQL/mysql5.initial.sql b/roundcubemail/SQL/mysql5.initial.sql
index f9d647b80..e01f2a6b1 100644
--- a/roundcubemail/SQL/mysql5.initial.sql
+++ b/roundcubemail/SQL/mysql5.initial.sql
@@ -76,6 +76,10 @@ CREATE TABLE `cache` (
  INDEX `user_cache_index` (`user_id`,`cache_key`),
  CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`)
+     ON DELETE CASCADE
+     ON UPDATE CASCADE,
+ CONSTRAINT `session_id_fk_cache` FOREIGN KEY (`session_id`)
+   REFERENCES `session`(`sess_id`)
      ON DELETE CASCADE
      ON UPDATE CASCADE
 ) TYPE=INNODB CHARACTER SET utf8 COLLATE utf8_general_ci;
-- 
cgit v1.2.3

