@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
-- http://www.phpmyadmin.net
- -
- -
-- Host: localhost
-- Host: localhost
-- Erstellungszeit: 12. Jul 2015 um 14:45
-- Erstellungszeit: 25. Aug 2015 um 15:29
-- Server Version: 5.6.12
-- Server Version: 5.6.12
-- PHP-Version: 5.5.3
-- PHP-Version: 5.5.3
@ -20,19 +20,12 @@ SET time_zone = "+00:00";
DROP TABLE IF EXISTS ` AngelTypes ` ;
DROP TABLE IF EXISTS ` AngelTypes ` ;
CREATE TABLE IF NOT EXISTS ` AngelTypes ` (
CREATE TABLE IF NOT EXISTS ` AngelTypes ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` name ` varchar ( 2 5) NOT NULL DEFAULT ' ' ,
` name ` varchar ( 50 ) NOT NULL DEFAULT ' ' ,
` restricted ` int ( 1 ) NOT NULL ,
` restricted ` int ( 1 ) NOT NULL ,
` description ` text NOT NULL ,
` description ` text NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE KEY ` Name ` ( ` name ` )
UNIQUE KEY ` Name ` ( ` name ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 2 ;
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 3 ;
- -
-- Daten für Tabelle `AngelTypes`
- -
INSERT INTO ` AngelTypes ` ( ` id ` , ` name ` , ` restricted ` , ` description ` ) VALUES
( 1 , ' testengel ' , 1 , ' # Überschrift in Ebene 1\n\n#### Überschrift in Ebene 4\n\n[Beschriftung des Hyperlinks](http://de.wikipedia.org/ "Titel, der beim Überfahren mit der Maus angezeigt wird") ' ) ;
-- --------------------------------------------------------
-- --------------------------------------------------------
@ -48,39 +41,40 @@ CREATE TABLE IF NOT EXISTS `GroupPrivileges` (
PRIMARY KEY ( ` id ` ) ,
PRIMARY KEY ( ` id ` ) ,
KEY ` group_id ` ( ` group_id ` , ` privilege_id ` ) ,
KEY ` group_id ` ( ` group_id ` , ` privilege_id ` ) ,
KEY ` privilege_id ` ( ` privilege_id ` )
KEY ` privilege_id ` ( ` privilege_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 25 8 ;
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 25 9 ;
- -
- -
-- Daten für Tabelle `GroupPrivileges`
-- Daten für Tabelle `GroupPrivileges`
- -
- -
INSERT INTO ` GroupPrivileges ` ( ` id ` , ` group_id ` , ` privilege_id ` ) VALUES
INSERT INTO ` GroupPrivileges ` ( ` id ` , ` group_id ` , ` privilege_id ` ) VALUES
( 85 , - 6 , 10 ) ,
( 85 , - 7 , 10 ) ,
( 87 , - 6 , 18 ) ,
( 87 , - 7 , 18 ) ,
( 86 , - 6 , 21 ) ,
( 86 , - 7 , 21 ) ,
( 216 , - 5 , 5 ) ,
( 216 , - 6 , 5 ) ,
( 212 , - 5 , 6 ) ,
( 212 , - 6 , 6 ) ,
( 207 , - 5 , 7 ) ,
( 207 , - 6 , 7 ) ,
( 211 , - 5 , 12 ) ,
( 211 , - 6 , 12 ) ,
( 208 , - 5 , 13 ) ,
( 208 , - 6 , 13 ) ,
( 210 , - 5 , 14 ) ,
( 210 , - 6 , 14 ) ,
( 214 , - 5 , 16 ) ,
( 214 , - 6 , 16 ) ,
( 209 , - 5 , 21 ) ,
( 209 , - 6 , 21 ) ,
( 213 , - 5 , 28 ) ,
( 213 , - 6 , 28 ) ,
( 206 , - 5 , 31 ) ,
( 206 , - 6 , 31 ) ,
( 215 , - 5 , 33 ) ,
( 215 , - 6 , 33 ) ,
( 257 , - 5 , 38 ) ,
( 257 , - 6 , 38 ) ,
( 219 , - 4 , 14 ) ,
( 219 , - 5 , 14 ) ,
( 221 , - 4 , 25 ) ,
( 221 , - 5 , 25 ) ,
( 220 , - 4 , 33 ) ,
( 220 , - 5 , 33 ) ,
( 241 , - 3 , 5 ) ,
( 241 , - 4 , 5 ) ,
( 238 , - 3 , 14 ) ,
( 238 , - 4 , 14 ) ,
( 240 , - 3 , 16 ) ,
( 240 , - 4 , 16 ) ,
( 237 , - 3 , 19 ) ,
( 237 , - 4 , 19 ) ,
( 242 , - 3 , 25 ) ,
( 242 , - 4 , 25 ) ,
( 235 , - 3 , 27 ) ,
( 235 , - 4 , 27 ) ,
( 239 , - 3 , 28 ) ,
( 239 , - 4 , 28 ) ,
( 236 , - 3 , 32 ) ,
( 236 , - 4 , 32 ) ,
( 258 , - 3 , 31 ) ,
( 247 , - 2 , 3 ) ,
( 247 , - 2 , 3 ) ,
( 246 , - 2 , 4 ) ,
( 246 , - 2 , 4 ) ,
( 255 , - 2 , 8 ) ,
( 255 , - 2 , 8 ) ,
@ -117,10 +111,11 @@ CREATE TABLE IF NOT EXISTS `Groups` (
- -
- -
INSERT INTO ` Groups ` ( ` Name ` , ` UID ` ) VALUES
INSERT INTO ` Groups ` ( ` Name ` , ` UID ` ) VALUES
( ' 6-Developer ' , - 6 ) ,
( ' 6-Developer ' , - 7 ) ,
( ' 5-Erzengel ' , - 5 ) ,
( ' 5-Erzengel ' , - 6 ) ,
( ' 4-Team Coordinator ' , - 4 ) ,
( ' 4-Team Coordinator ' , - 5 ) ,
( ' 3-Shift Coordinator ' , - 3 ) ,
( ' 3-Shift Coordinator ' , - 4 ) ,
( ' Shirt-Manager ' , - 3 ) ,
( ' 2-Engel ' , - 2 ) ,
( ' 2-Engel ' , - 2 ) ,
( ' 1-Gast ' , - 1 ) ;
( ' 1-Gast ' , - 1 ) ;
@ -307,7 +302,7 @@ CREATE TABLE IF NOT EXISTS `Room` (
` Number ` int ( 11 ) DEFAULT NULL ,
` Number ` int ( 11 ) DEFAULT NULL ,
PRIMARY KEY ( ` RID ` ) ,
PRIMARY KEY ( ` RID ` ) ,
UNIQUE KEY ` Name ` ( ` Name ` )
UNIQUE KEY ` Name ` ( ` Name ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1 ;
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 6 ;
-- --------------------------------------------------------
-- --------------------------------------------------------
@ -347,11 +342,17 @@ CREATE TABLE IF NOT EXISTS `Shifts` (
` RID ` int ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` RID ` int ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` URL ` text ,
` URL ` text ,
` PSID ` int ( 11 ) DEFAULT NULL ,
` PSID ` int ( 11 ) DEFAULT NULL ,
` created_by_user_id ` int ( 11 ) DEFAULT NULL ,
` created_at_timestamp ` int ( 11 ) NOT NULL ,
` edited_by_user_id ` int ( 11 ) DEFAULT NULL ,
` edited_at_timestamp ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( ` SID ` ) ,
PRIMARY KEY ( ` SID ` ) ,
UNIQUE KEY ` PSID ` ( ` PSID ` ) ,
UNIQUE KEY ` PSID ` ( ` PSID ` ) ,
KEY ` RID ` ( ` RID ` ) ,
KEY ` RID ` ( ` RID ` ) ,
KEY ` shifttype_id ` ( ` shifttype_id ` )
KEY ` shifttype_id ` ( ` shifttype_id ` ) ,
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1 ;
KEY ` created_by_user_id ` ( ` created_by_user_id ` ) ,
KEY ` edited_by_user_id ` ( ` edited_by_user_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 133 ;
-- --------------------------------------------------------
-- --------------------------------------------------------
@ -374,7 +375,7 @@ CREATE TABLE IF NOT EXISTS `ShiftTypes` (
- -
- -
INSERT INTO ` ShiftTypes ` ( ` id ` , ` name ` , ` angeltype_id ` , ` description ` ) VALUES
INSERT INTO ` ShiftTypes ` ( ` id ` , ` name ` , ` angeltype_id ` , ` description ` ) VALUES
( 4 , ' asdf ' , NULL , ' ' ) ;
( 4 , ' Schichttyp1 ' , NULL , ' ' ) ;
-- --------------------------------------------------------
-- --------------------------------------------------------
@ -411,23 +412,25 @@ CREATE TABLE IF NOT EXISTS `User` (
` kommentar ` text ,
` kommentar ` text ,
` Hometown ` varchar ( 255 ) NOT NULL DEFAULT ' ' ,
` Hometown ` varchar ( 255 ) NOT NULL DEFAULT ' ' ,
` api_key ` varchar ( 32 ) NOT NULL ,
` api_key ` varchar ( 32 ) NOT NULL ,
` got_voucher ` tiny int( 1) NOT NULL ,
` got_voucher ` int( 1 1) NOT NULL ,
` arrival_date ` int ( 11 ) DEFAULT NULL ,
` arrival_date ` int ( 11 ) DEFAULT NULL ,
` planned_arrival_date ` int ( 11 ) NOT NULL ,
` planned_arrival_date ` int ( 11 ) NOT NULL ,
` planned_departure_date ` int ( 11 ) DEFAULT NULL ,
PRIMARY KEY ( ` UID ` ) ,
PRIMARY KEY ( ` UID ` ) ,
UNIQUE KEY ` Nick ` ( ` Nick ` ) ,
UNIQUE KEY ` Nick ` ( ` Nick ` ) ,
KEY ` api_key ` ( ` api_key ` ) ,
KEY ` api_key ` ( ` api_key ` ) ,
KEY ` password_recovery_token ` ( ` password_recovery_token ` ) ,
KEY ` password_recovery_token ` ( ` password_recovery_token ` ) ,
KEY ` force_active ` ( ` force_active ` ) ,
KEY ` force_active ` ( ` force_active ` ) ,
KEY ` arrival_date ` ( ` arrival_date ` , ` planned_arrival_date ` )
KEY ` arrival_date ` ( ` arrival_date ` , ` planned_arrival_date ` ) ,
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 2 ;
KEY ` planned_departure_date ` ( ` planned_departure_date ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 5 ;
- -
- -
-- Daten für Tabelle `User`
-- Daten für Tabelle `User`
- -
- -
INSERT INTO ` User ` ( ` UID ` , ` Nick ` , ` Name ` , ` Vorname ` , ` Alter ` , ` Telefon ` , ` DECT ` , ` Handy ` , ` email ` , ` email_shiftinfo ` , ` jabber ` , ` Size ` , ` Passwort ` , ` password_recovery_token ` , ` Gekommen ` , ` Aktiv ` , ` force_active ` , ` Tshirt ` , ` color ` , ` Sprache ` , ` Menu ` , ` lastLogIn ` , ` CreateDate ` , ` Art ` , ` kommentar ` , ` Hometown ` , ` api_key ` , ` got_voucher ` , ` arrival_date ` , ` planned_arrival_date ` ) VALUES
INSERT INTO ` User ` ( ` UID ` , ` Nick ` , ` Name ` , ` Vorname ` , ` Alter ` , ` Telefon ` , ` DECT ` , ` Handy ` , ` email ` , ` email_shiftinfo ` , ` jabber ` , ` Size ` , ` Passwort ` , ` password_recovery_token ` , ` Gekommen ` , ` Aktiv ` , ` force_active ` , ` Tshirt ` , ` color ` , ` Sprache ` , ` Menu ` , ` lastLogIn ` , ` CreateDate ` , ` Art ` , ` kommentar ` , ` Hometown ` , ` api_key ` , ` got_voucher ` , ` arrival_date ` , ` planned_arrival_date ` , ` planned_departure_date ` ) VALUES
( 1 , ' admin ' , ' Gates ' , ' Bill ' , 42 , ' ' , ' - ' , ' ' , ' admin@example.com ' , 0 , ' ' , ' XL ' , ' $6$rounds=5000$hjXbIhoRTH3vKiRa$Wl2P2iI5T9iRR.HHu/YFHswBW0WVn0yxCfCiX0Keco9OdIoDK6bIAADswP6KvMCJSwTGdV8PgA8g8Xfw5l8BD1 ' , NULL , 1 , 0, 0 , 0 , 2 , ' de_DE.UTF-8 ' , ' L ' , 143 6705059 , ' 0000-00-00 00:00:00 ' , ' ' , ' ' , ' ' , ' 038850abdd1feb264406be3ffa746235 ' , 0, NULL , 0 ) ;
( 1 , ' admin ' , ' Gates ' , ' Bill ' , 42 , ' ' , ' - ' , ' ' , ' admin@example.com ' , 1 , ' ' , ' XL ' , ' $6$rounds=5000$hjXbIhoRTH3vKiRa$Wl2P2iI5T9iRR.HHu/YFHswBW0WVn0yxCfCiX0Keco9OdIoDK6bIAADswP6KvMCJSwTGdV8PgA8g8Xfw5l8BD1 ' , NULL , 1 , 1, 0 , 1 , 2 , ' de_DE.UTF-8 ' , ' L ' , 143 9759300 , ' 0000-00-00 00:00:00 ' , ' ' , ' ' , ' ' , ' 038850abdd1feb264406be3ffa746235 ' , 3, 1439490478 , 1436964455 , 1440161255 ) ;
-- --------------------------------------------------------
-- --------------------------------------------------------
@ -447,14 +450,7 @@ CREATE TABLE IF NOT EXISTS `UserAngelTypes` (
KEY ` angeltype_id ` ( ` angeltype_id ` ) ,
KEY ` angeltype_id ` ( ` angeltype_id ` ) ,
KEY ` confirm_user_id ` ( ` confirm_user_id ` ) ,
KEY ` confirm_user_id ` ( ` confirm_user_id ` ) ,
KEY ` coordinator ` ( ` coordinator ` )
KEY ` coordinator ` ( ` coordinator ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 16 ;
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 21 ;
- -
-- Daten für Tabelle `UserAngelTypes`
- -
INSERT INTO ` UserAngelTypes ` ( ` id ` , ` user_id ` , ` angeltype_id ` , ` confirm_user_id ` , ` coordinator ` ) VALUES
( 15 , 1 , 1 , 1 , 1 ) ;
-- --------------------------------------------------------
-- --------------------------------------------------------
@ -470,17 +466,17 @@ CREATE TABLE IF NOT EXISTS `UserGroups` (
PRIMARY KEY ( ` id ` ) ,
PRIMARY KEY ( ` id ` ) ,
KEY ` uid ` ( ` uid ` , ` group_id ` ) ,
KEY ` uid ` ( ` uid ` , ` group_id ` ) ,
KEY ` group_id ` ( ` group_id ` )
KEY ` group_id ` ( ` group_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 13 ;
) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 20 ;
- -
- -
-- Daten für Tabelle `UserGroups`
-- Daten für Tabelle `UserGroups`
- -
- -
INSERT INTO ` UserGroups ` ( ` id ` , ` uid ` , ` group_id ` ) VALUES
INSERT INTO ` UserGroups ` ( ` id ` , ` uid ` , ` group_id ` ) VALUES
( 3 , 1 , - 6 ) ,
( 3 , 1 , - 7 ) ,
( 4 , 1 , - 5 ) ,
( 4 , 1 , - 6 ) ,
( 12 , 1 , - 4 ) ,
( 12 , 1 , - 5 ) ,
( 2 , 1 , - 3 ) ,
( 2 , 1 , - 4 ) ,
( 1 , 1 , - 2 ) ;
( 1 , 1 , - 2 ) ;
- -
- -
@ -542,7 +538,9 @@ ALTER TABLE `ShiftEntry`
- -
- -
ALTER TABLE ` Shifts `
ALTER TABLE ` Shifts `
ADD CONSTRAINT ` shifts_ibfk_1 ` FOREIGN KEY ( ` RID ` ) REFERENCES ` Room ` ( ` RID ` ) ON DELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT ` shifts_ibfk_1 ` FOREIGN KEY ( ` RID ` ) REFERENCES ` Room ` ( ` RID ` ) ON DELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT ` shifts_ibfk_2 ` FOREIGN KEY ( ` shifttype_id ` ) REFERENCES ` ShiftTypes ` ( ` id ` ) ON DELETE CASCADE ON UPDATE CASCADE ;
ADD CONSTRAINT ` shifts_ibfk_2 ` FOREIGN KEY ( ` shifttype_id ` ) REFERENCES ` ShiftTypes ` ( ` id ` ) ON DELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT ` shifts_ibfk_3 ` FOREIGN KEY ( ` created_by_user_id ` ) REFERENCES ` User ` ( ` UID ` ) ON DELETE SET NULL ON UPDATE CASCADE ,
ADD CONSTRAINT ` shifts_ibfk_4 ` FOREIGN KEY ( ` edited_by_user_id ` ) REFERENCES ` User ` ( ` UID ` ) ON DELETE SET NULL ON UPDATE CASCADE ;
- -
- -
-- Constraints der Tabelle `ShiftTypes`
-- Constraints der Tabelle `ShiftTypes`