summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-19 12:00:34 +0200
committerBjörn Geiger2011-08-19 12:00:34 +0200
commit216b0e0636bcc78759776a0a028cc8b113a9ebfb (patch)
tree8bd961b5f063470a1587226ca7868f3dd1e266f2 /setup
parentverschiedene Korrekturen und Datenbankänderung (diff)
downloadpoolctrl-216b0e0636bcc78759776a0a028cc8b113a9ebfb.tar.gz
poolctrl-216b0e0636bcc78759776a0a028cc8b113a9ebfb.tar.xz
poolctrl-216b0e0636bcc78759776a0a028cc8b113a9ebfb.zip
Datenbankänderungen
Diffstat (limited to 'setup')
-rw-r--r--setup/poolctrl.sql12
-rw-r--r--setup/poolctrl_data.sql5
2 files changed, 15 insertions, 2 deletions
diff --git a/setup/poolctrl.sql b/setup/poolctrl.sql
index 8c11f06..470716e 100644
--- a/setup/poolctrl.sql
+++ b/setup/poolctrl.sql
@@ -20,16 +20,23 @@ CREATE TABLE IF NOT EXISTS `poolctrl_event` (
`repeat` bool NOT NULL DEFAULT false,
`immediate` bool NOT NULL DEFAULT false,
`running` bool NOT NULL DEFAULT false,
- `runningType` tinyint(4) DEFAULT NULL,
+ `runningtype` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`eventID`),
KEY `pbs_poolID` (`pbs_poolID`),
KEY `pbs_membershipID` (`pbs_membershipID`),
KEY `pbs_bootosID` (`pbs_bootosID`),
KEY `pbs_bootmenuID` (`pbs_bootmenuID`),
KEY `pbs_filterID` (`pbs_filterID`),
- KEY `category` (`category`)
+ KEY `category` (`category`),
+ KEY `runningtype` (`runningtype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;
+CREATE TABLE IF NOT EXISTS `poolctrl_runningtype` (
+ `runningtypeID` int(11) NOT NULL AUTO_INCREMENT,
+ `title` varchar(30) COLLATE utf8_unicode_ci NOT NULL UNIQUE,
+ PRIMARY KEY (`runningTypID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;
+
CREATE TABLE IF NOT EXISTS `poolctrl_eventcategory` (
`eventcategoryID` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(30) COLLATE utf8_unicode_ci NOT NULL UNIQUE,
@@ -194,5 +201,6 @@ ALTER TABLE `poolctrl_event`
ADD CONSTRAINT `poolctrl_event_bootosidC` FOREIGN KEY (`pbs_bootosID`) REFERENCES `pbs_bootos` (`bootosID`) ON DELETE CASCADE,
ADD CONSTRAINT `poolctrl_event_membershipidC` FOREIGN KEY (`pbs_membershipID`) REFERENCES `pbs_membership` (`membershipID`) ON DELETE CASCADE,
ADD CONSTRAINT `poolctrl_event_categoryC` FOREIGN KEY (`category`) REFERENCES `poolctrl_eventcategory` (`eventcategoryID`) ON DELETE CASCADE,
+ ADD CONSTRAINT `poolctrl_event_runningtypeC` FOREIGN KEY (`runningtype`) REFERENCES `poolctrl_runningtype` (`runningtype`) ON DELETE SET NULl,
ADD CONSTRAINT `poolctrl_event_startC` CHECK (start > CURRENT_TIMESTAMP()),
ADD CONSTRAINT `poolctrl_event_endC` CHECK (end > start);
diff --git a/setup/poolctrl_data.sql b/setup/poolctrl_data.sql
index 365a3a5..f22da32 100644
--- a/setup/poolctrl_data.sql
+++ b/setup/poolctrl_data.sql
@@ -90,6 +90,11 @@ INSERT INTO `poolctrl_eventcategory` (`eventcategoryID`, `title`) VALUES
(3, 'Boot'),
(4, 'Shutdown');
+-- Adding runningtypes
+INSERT INTO `poolctrl_runningtype` (`runningtypeID`, `title`) VALUES
+(1, 'Boot'),
+(2, 'Shutdown');
+
-- Adding events
INSERT INTO `poolctrl_event` (`eventID`, `title`, `start`, `end`, `category`, `pbs_poolID`, `pbs_membershipID`, `pbs_bootosID`, `note`, `pbs_bootmenuID`, `pbs_filterID`) VALUES
(1, 'Systeme I', '2011-06-24 12:10:00', '2011-06-24 14:00:00', '1', 1, 1, 1, 'Systeme I Vorlesung', 1, 1),