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:02:16 (GMT)
commit0e40a59ae287464679d0ad9c78cbcf0ef5f08648 (patch)
tree1e06f0d1b3f7af50775e7b76ffdb83b23996bcbe
parentfbaa3f865eacc5fb78b2fc5149cba4b68e3a5769 (diff)
downloadroundcubemail-plugins-kolab-0e40a59ae287464679d0ad9c78cbcf0ef5f08648.tar.gz
Don't restrict alarms primary key to event/alarm UID but include user_id
-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 de33926..d500961 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(`alarm_id`),
+ PRIMARY KEY(`alarm_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`);