summaryrefslogtreecommitdiff
path: root/db/update.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/update.sql')
-rw-r--r--db/update.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/update.sql b/db/update.sql
index 8c9bdaec..7375b507 100644
--- a/db/update.sql
+++ b/db/update.sql
@@ -6,6 +6,8 @@ CREATE TABLE IF NOT EXISTS `ShiftTypes` (
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
+ALTER TABLE `ShiftTypes` ADD INDEX ( `angeltype_id` );
+ALTER TABLE `ShiftTypes` ADD FOREIGN KEY ( `angeltype_id` ) REFERENCES `engelsystem`.`AngelTypes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
INSERT INTO `engelsystem`.`Privileges` (`id`, `name`, `desc`) VALUES (NULL , 'shifttypes', 'Administrate shift types');
INSERT INTO `GroupPrivileges` SET `group_id`=-5, `privilege_id`=(SELECT `id` FROM `Privileges` WHERE `name`='shifttypes');