summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorBjörn Geiger2011-06-28 11:45:38 +0200
committerBjörn Geiger2011-06-28 11:45:38 +0200
commitf2178d2d330f3416a6f56ca6185c4a4a4c47475d (patch)
tree995965cc6205b263ed0fc0a2858ebf06b738d579 /setup
parentCSS korrigiert (diff)
downloadpoolctrl-f2178d2d330f3416a6f56ca6185c4a4a4c47475d.tar.gz
poolctrl-f2178d2d330f3416a6f56ca6185c4a4a4c47475d.tar.xz
poolctrl-f2178d2d330f3416a6f56ca6185c4a4a4c47475d.zip
Fehler in Datenbank korrgiert
Diffstat (limited to 'setup')
-rw-r--r--setup/poolctrl.sql4
-rw-r--r--setup/poolctrl_data.sql10
2 files changed, 9 insertions, 5 deletions
diff --git a/setup/poolctrl.sql b/setup/poolctrl.sql
index eaecfa0..2a4432a 100644
--- a/setup/poolctrl.sql
+++ b/setup/poolctrl.sql
@@ -115,6 +115,7 @@ CREATE TABLE IF NOT EXISTS `pbs_membership` (
CREATE TABLE IF NOT EXISTS `pbs_pool` (
`poolID` int(11) NOT NULL AUTO_INCREMENT,
+ `groupID` int(11) NOT NULL,
`title` varchar(30) NOT NULL,
`description` varchar(140),
`location` varchar(30),
@@ -159,6 +160,9 @@ ALTER TABLE `pbs_bootos`
ALTER TABLE `pbs_client`
ADD CONSTRAINT `pbs_client_ibfk_1` FOREIGN KEY (`groupID`) REFERENCES `pbs_group` (`groupID`) ON DELETE CASCADE;
+ALTER TABLE `pbs_pool`
+ ADD CONSTRAINT `pbs_pool_ibfk_1` FOREIGN KEY (`groupID`) REFERENCES `pbs_group` (`groupID`) ON DELETE CASCADE;
+
ALTER TABLE `pbs_poolentries`
ADD CONSTRAINT `pbs_poolentries_ibfk_1` FOREIGN KEY (`poolID`) REFERENCES `pbs_pool` (`poolID`) ON DELETE CASCADE;
diff --git a/setup/poolctrl_data.sql b/setup/poolctrl_data.sql
index 795a17c..ca3ae93 100644
--- a/setup/poolctrl_data.sql
+++ b/setup/poolctrl_data.sql
@@ -80,11 +80,11 @@ INSERT INTO `pbs_config` (`configID`, `title`, `description`, `groupID`, `member
(2, 'Config 2', 'Desc2' ,null, 1, '1', '1299693690', '1');
-- Adding pools
-INSERT INTO `pbs_pool` (`poolID`, `title`, `description`, `location`) VALUES
-(1, 'Pool 1', 'Description 1', 'Keller'),
-(2, 'Pool 2', 'Description 2', 'EG'),
-(3, 'Pool 3', 'Description 3', '1 OG'),
-(4, 'Pool 4', 'Description 4', '2 OG');
+INSERT INTO `pbs_pool` (`poolID`, `groupID`, `title`, `description`, `location`) VALUES
+(1, 1, 'Pool 1', 'Description 1', 'Keller'),
+(2, 1, 'Pool 2', 'Description 2', 'EG'),
+(3, 1, 'Pool 3', 'Description 3', '1 OG'),
+(4, 1, 'Pool 4', 'Description 4', '2 OG');
-- Adding client to pools (poolentries)
INSERT INTO `pbs_poolentries` (`poolentriesID`, `poolID`, `clientID`) VALUES