From 7fb2e4ca050784269e78133cc5a2610e066c660f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Dec 2021 14:56:43 +0100 Subject: [statistics/passthrough] Consider group<->location mapping for KCL --- modules-available/passthrough/install.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules-available/passthrough/install.inc.php') diff --git a/modules-available/passthrough/install.inc.php b/modules-available/passthrough/install.inc.php index e08be38b..01d3edbb 100644 --- a/modules-available/passthrough/install.inc.php +++ b/modules-available/passthrough/install.inc.php @@ -6,4 +6,18 @@ $result[] = tableCreate('passthrough_group', " PRIMARY KEY (`groupid`) "); +$result[] = tableCreate('passthrough_group_x_location', " + `groupid` varchar(32) CHARACTER SET ascii DEFAULT NULL, + `locationid` INT(11) NOT NULL, + PRIMARY KEY (`groupid`, `locationid`) +"); + +$result[] = tableAddConstraint('passthrough_group_x_location', 'groupid', + 'passthrough_group', 'groupid', + 'ON DELETE CASCADE ON UPDATE CASCADE'); + +$result[] = tableAddConstraint('passthrough_group_x_location', 'locationid', + 'location', 'locationid', + 'ON DELETE CASCADE ON UPDATE CASCADE'); + responseFromArray($result); \ No newline at end of file -- cgit v1.2.3-55-g7522