diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 9a5bb918a70..d89721bdfd0 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1653,6 +1653,11 @@ function main_upgrade($oldversion=0) { table_column('course_request','','password','varchar',50); } + if ($oldversion < 2006030800) { # add extra indexes to log (see bug #4112) + modify_database('',"ALTER TABLE prefix_log ADD INDEX userid (userid);"); + modify_database('',"ALTER TABLE prefix_log ADD INDEX info (info);"); + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 41137781e29..eb2a07e8906 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1394,6 +1394,11 @@ function main_upgrade($oldversion=0) { if ($oldversion < 2005101200) { # add enrolment key to course_request. table_column('course_request','','password','text'); } + + if ($oldversion < 2006030800) { # add extra indexes to log (see bug #4112) + modify_database('',"CREATE INDEX prefix_log_userid_idx ON prefix_log (userid);"); + modify_database('',"CREATE INDEX prefix_log_info_idx ON prefix_log (info);"); + } return $result; } diff --git a/version.php b/version.php index a629658ee88..d5716cc3b20 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2006022400; // YYYYMMDD = date + $version = 2006030800; // YYYYMMDD = date // XY = increments within a single day $release = '1.6 development'; // Human-friendly version name