@@ -, +, @@ - Update database - Play with log viewer : /cgi-bin/koha/tools/viewlog.pl - Perform searches with only one filter defined - Also check you see indexes with SQL query : SHOW CREATE TABLE action_logs --- installer/data/mysql/kohastructure.sql | 7 ++++++- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -2735,7 +2735,12 @@ CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the `object` int(11) default NULL, -- the object that the action was taken against (could be a borrowernumber, itemnumber, etc) `info` text, -- information about the action (usually includes SQL statement) PRIMARY KEY (`action_id`), - KEY (`timestamp`,`user`) + KEY `timestamp_idx` (`timestamp`), + KEY `user_idx` (`user`), + KEY `module_idx` (`module`(255)), + KEY `action_idx` (`action`(255)), + KEY `object_idx` (`object`), + KEY `info_idx` (`info`(255)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -7750,6 +7750,21 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if(CheckVersion($DBversion)) { + $dbh->do(q{ + ALTER TABLE `action_logs` + DROP KEY timestamp, + ADD KEY `timestamp_idx` (`timestamp`), + ADD KEY `user_idx` (`user`), + ADD KEY `module_idx` (`module`(255)), + ADD KEY `action_idx` (`action`(255)), + ADD KEY `object_idx` (`object`), + ADD KEY `info_idx` (`info`(255)) + }); + print "Upgrade to $DBversion done (Bug 3445 - action_logs table needs some thought)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS --