From e18b0b0c764652d6f77465082eb474330f43915b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 31 Oct 2019 15:15:03 +0100 Subject: [statistics/baseconfig] Allow per-machine configvar overrides --- modules-available/statistics/install.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules-available/statistics/install.inc.php') diff --git a/modules-available/statistics/install.inc.php b/modules-available/statistics/install.inc.php index 2bcb6b8d..2831905d 100644 --- a/modules-available/statistics/install.inc.php +++ b/modules-available/statistics/install.inc.php @@ -107,6 +107,16 @@ $res[] = tableCreate('pciid', " PRIMARY KEY (`category`,`id`) "); +// baseconfig override per machine +$res[] = tableCreate('setting_machine', ' + `machineuuid` char(36) CHARACTER SET ascii NOT NULL, + `setting` VARCHAR(28) NOT NULL, + `value` TEXT NOT NULL, + `displayvalue` TEXT NOT NULL, + PRIMARY KEY (`machineuuid`,`setting`), + KEY `setting` (`setting`) +'); + // need trigger? if ($machineCreate === UPDATE_DONE) { $addTrigger = true; @@ -259,5 +269,9 @@ while ($row = $res2->fetch(PDO::FETCH_ASSOC)) { } } +// 2019-10-31: New table for per-machine config override +$res[] = tableAddConstraint('setting_machine', 'machineuuid', 'machine', 'machineuuid', + 'ON UPDATE CASCADE ON DELETE CASCADE'); + // Create response responseFromArray($res); -- cgit v1.2.3-55-g7522