diff options
author | Simon Rettberg | 2017-11-03 17:56:06 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-11-03 17:56:06 +0100 |
commit | fb60fb0cd595a20fa3d09a854abeffb33b8b45dc (patch) | |
tree | 9e1fc7e502e0011ca90e7cad8537e3eb78a330ea /modules-available | |
parent | [sysconfig/runmode] Deliver bare config.tgz with just global hook data when "... (diff) | |
download | slx-admin-fb60fb0cd595a20fa3d09a854abeffb33b8b45dc.tar.gz slx-admin-fb60fb0cd595a20fa3d09a854abeffb33b8b45dc.tar.xz slx-admin-fb60fb0cd595a20fa3d09a854abeffb33b8b45dc.zip |
[syslog] Tweak machineuuid index in installer
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/syslog/install.inc.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules-available/syslog/install.inc.php b/modules-available/syslog/install.inc.php index 539f2449..406a6cc6 100644 --- a/modules-available/syslog/install.inc.php +++ b/modules-available/syslog/install.inc.php @@ -2,7 +2,7 @@ $res = array(); -$res[] = tableCreate('clientlog', " +$res[] = $tc = tableCreate('clientlog', " `logid` int(10) unsigned NOT NULL AUTO_INCREMENT, `dateline` int(10) unsigned NOT NULL, `logtypeid` varchar(30) NOT NULL, @@ -14,7 +14,7 @@ $res[] = tableCreate('clientlog', " KEY `dateline` (`dateline`), KEY `logtypeid` (`logtypeid`,`dateline`), KEY `clientip` (`clientip`,`dateline`), - KEY `machineuuid` (`machineuuid`,`dateline`) + KEY `machineuuid` (`machineuuid`,`logid`) "); // Update path @@ -29,6 +29,12 @@ if (!tableHasColumn('clientlog', 'machineuuid')) { $res[] = UPDATE_DONE; } +// 2017-11-03: Create proper index for query in statistics module +if ($tc !== UPDATE_DONE) { + Database::exec("ALTER TABLE `openslx`.`clientlog` DROP INDEX `machineuuid` , + ADD INDEX `machineuuid` ( `machineuuid` , `logid` )"); +} + // Create response for browser if (in_array(UPDATE_DONE, $res)) { |