diff options
author | Simon Rettberg | 2020-07-07 16:39:42 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-07-30 13:29:14 +0200 |
commit | 7d1c91321ce7ba1df0b57ff573e46a9b96bcca98 (patch) | |
tree | c26f5af33895f80734ccb2b5fd42da3d23a4dd1c /modules-available/statistics/install.inc.php | |
parent | [statistics] Fix system model list width in summary mode (diff) | |
download | slx-admin-7d1c91321ce7ba1df0b57ff573e46a9b96bcca98.tar.gz slx-admin-7d1c91321ce7ba1df0b57ff573e46a9b96bcca98.tar.xz slx-admin-7d1c91321ce7ba1df0b57ff573e46a9b96bcca98.zip |
[statistics] Keep track of client runmode
Diffstat (limited to 'modules-available/statistics/install.inc.php')
-rw-r--r-- | modules-available/statistics/install.inc.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules-available/statistics/install.inc.php b/modules-available/statistics/install.inc.php index 2831905d..a1dd3305 100644 --- a/modules-available/statistics/install.inc.php +++ b/modules-available/statistics/install.inc.php @@ -273,5 +273,15 @@ while ($row = $res2->fetch(PDO::FETCH_ASSOC)) { $res[] = tableAddConstraint('setting_machine', 'machineuuid', 'machine', 'machineuuid', 'ON UPDATE CASCADE ON DELETE CASCADE'); +// 2020-06-29: Track current runmode (as reported by client) +if (!tableHasColumn('machine', 'currentrunmode')) { + $ret = Database::exec("ALTER TABLE `machine` + ADD COLUMN `currentrunmode` varchar(30) NOT NULL DEFAULT '' AFTER `hostname`"); + if ($ret === false) { + finalResponse(UPDATE_FAILED, 'Adding live_cpuload column to machine table failed: ' . Database::lastError()); + } + $res[] = UPDATE_DONE; +} + // Create response responseFromArray($res); |