From 3f8e5e47c05a2cf8fe4e51034523b0b6021b45f5 Mon Sep 17 00:00:00 2001
From: Philip Häusler <msquare@notrademark.de>
Date: Tue, 16 Dec 2014 10:19:38 +0100
Subject: add update, delete and view for shift type

---
 db/update.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'db/update.sql')

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');
 
-- 
cgit v1.2.3-70-g09d2

