summaryrefslogtreecommitdiffstats
path: root/setup/poolctrl.sql
diff options
context:
space:
mode:
Diffstat (limited to 'setup/poolctrl.sql')
-rw-r--r--setup/poolctrl.sql12
1 files changed, 10 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);