From 63b816e27263b8fb45aee0273e8cfe822f7428c1 Mon Sep 17 00:00:00 2001
From: thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>
Date: Sun, 18 Mar 2007 17:11:43 +0000
Subject: Use user_id for unique key in messages table (closes #1484074)

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

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

diff --git a/roundcubemail/SQL/mysql5.initial.sql b/roundcubemail/SQL/mysql5.initial.sql
index ee6fc3352..ae155e1d0 100644
--- a/roundcubemail/SQL/mysql5.initial.sql
+++ b/roundcubemail/SQL/mysql5.initial.sql
@@ -55,7 +55,7 @@ CREATE TABLE `messages` (
  PRIMARY KEY(`message_id`),
  INDEX `idx`(`idx`),
  INDEX `uid`(`uid`),
- UNIQUE `uniqueness` (`cache_key`, `uid`),
+ UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`),
  CONSTRAINT `User_ID_FK_messages` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`)
      ON DELETE CASCADE
-- 
cgit v1.2.3

