]> git.mjollnir.org Git - moodle.git/commitdiff
Adding more indexes to the log table - bug 4112 + version bump
authormjollnir_ <mjollnir_>
Tue, 7 Mar 2006 22:14:40 +0000 (22:14 +0000)
committermjollnir_ <mjollnir_>
Tue, 7 Mar 2006 22:14:40 +0000 (22:14 +0000)
lib/db/mysql.php
lib/db/postgres7.php
version.php

index 9a5bb918a708a652dcbf9724d46ae00c1a837fb1..d89721bdfd0b6c001f71f21a8f30f8a17cf3318e 100644 (file)
@@ -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;
 }
 
index 41137781e29e30e2bc6ae318b98aea510a8c77ee..eb2a07e89066bb61a5448f4f160206853e5a8111 100644 (file)
@@ -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;
 }
index a629658ee88aa80b743311c81b7c1dcd116f1237..d5716cc3b20504f7b9464eac2347569c085bde6c 100644 (file)
@@ -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