summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/install.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2021-09-21 16:52:06 +0200
committerSimon Rettberg2022-03-09 15:06:54 +0100
commit67e6b6c9981207d7d658f2ad2bf1c39b75c099c7 (patch)
treed2f54c424dd983a1500acf0d3d0bc3bbfee6e9cd /modules-available/statistics/install.inc.php
parent[statistics] Support new json-format of hardware info from client (diff)
downloadslx-admin-67e6b6c9981207d7d658f2ad2bf1c39b75c099c7.tar.gz
slx-admin-67e6b6c9981207d7d658f2ad2bf1c39b75c099c7.tar.xz
slx-admin-67e6b6c9981207d7d658f2ad2bf1c39b75c099c7.zip
[passthrough] New module for managing hardware passthrough for QEMU
Diffstat (limited to 'modules-available/statistics/install.inc.php')
-rw-r--r--modules-available/statistics/install.inc.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules-available/statistics/install.inc.php b/modules-available/statistics/install.inc.php
index 5856c81e..1b664d04 100644
--- a/modules-available/statistics/install.inc.php
+++ b/modules-available/statistics/install.inc.php
@@ -40,6 +40,7 @@ $res[] = tableCreate('machine', "
`cpumodel` varchar(120) NOT NULL,
`systemmodel` varchar(120) NOT NULL DEFAULT '',
`id44mb` int(10) unsigned NOT NULL,
+ `id45mb` int(10) unsigned NOT NULL,
`badsectors` int(10) unsigned NOT NULL,
`data` mediumblob NOT NULL,
`dataparsetime` int(10) unsigned NOT NULL DEFAULT 0,
@@ -339,7 +340,15 @@ if (!tableHasColumn('machine', 'dataparsetime')) {
$ret = Database::exec("ALTER TABLE `machine`
ADD COLUMN `dataparsetime` int(10) unsigned NOT NULL DEFAULT '0' AFTER `data`");
if ($ret === false) {
- finalResponse(UPDATE_FAILED, 'Adding mem-stat columns to machine table failed: ' . Database::lastError());
+ finalResponse(UPDATE_FAILED, 'Adding dateparsetime column to machine table failed: ' . Database::lastError());
+ }
+ $res[] = UPDATE_DONE;
+}
+if (!tableHasColumn('machine', 'id45mb')) {
+ $ret = Database::exec("ALTER TABLE `machine`
+ ADD COLUMN `id45mb` int(10) unsigned NOT NULL AFTER `id44mb`");
+ if ($ret === false) {
+ finalResponse(UPDATE_FAILED, 'Adding id45mb column to machine table failed: ' . Database::lastError());
}
$res[] = UPDATE_DONE;
}