summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-16 10:19:38 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-17 14:59:41 +0100
commit3f8e5e47c05a2cf8fe4e51034523b0b6021b45f5 (patch)
treec0a09efb977bc903d61b7fbf5b041bdc852c65c2 /db
parent526167ed11a9e13d20698029bc08f13cd574d946 (diff)
add update, delete and view for shift type
Diffstat (limited to 'db')
-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');