summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-26 13:44:25 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-26 14:18:32 (GMT)
commit48cdab6d2a0073080eee715e110864f9b13af199 (patch)
tree8bb9456c5f885e2a0f1fb523a3355260a368ba4c
parent84a7fca3ca464966fbf2263efdf0ac40dc1715e4 (diff)
downloadroundcubemail-plugins-kolab-48cdab6d2a0073080eee715e110864f9b13af199.tar.gz
Don't restrict alarms primary key to event UID but include user_id (#3519)
-rw-r--r--plugins/calendar/drivers/kolab/SQL/mysql.initial.sql2
-rw-r--r--plugins/calendar/drivers/kolab/SQL/mysql/2014082600.sql2
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql b/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql
index f10d902..e145dc1 100644
--- a/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql
+++ b/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `kolab_alarms` (
`user_id` int(10) UNSIGNED NOT NULL,
`notifyat` DATETIME DEFAULT NULL,
`dismissed` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY(`event_id`),
+ PRIMARY KEY(`event_id`,`user_id`),
CONSTRAINT `fk_kolab_alarms_user_id` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) /*!40000 ENGINE=INNODB */;
diff --git a/plugins/calendar/drivers/kolab/SQL/mysql/2014082600.sql b/plugins/calendar/drivers/kolab/SQL/mysql/2014082600.sql
new file mode 100644
index 0000000..501eb5c
--- /dev/null
+++ b/plugins/calendar/drivers/kolab/SQL/mysql/2014082600.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `kolab_alarms` DROP PRIMARY KEY;
+ALTER TABLE `kolab_alarms` ADD PRIMARY KEY (`alarm_id`, `user_id`);