]> git.mjollnir.org Git - moodle.git/commitdiff
Added a missing index for some sites (bug 5100)
authormoodler <moodler>
Wed, 5 Apr 2006 13:45:14 +0000 (13:45 +0000)
committermoodler <moodler>
Wed, 5 Apr 2006 13:45:14 +0000 (13:45 +0000)
lib/db/mysql.php
lib/db/postgres7.php
version.php

index 217fa6e1d626d48f25ad456a12f83dcb2094b212..7b16386f85d0f6d422438bf9b161388591f40c3a 100644 (file)
@@ -1747,6 +1747,10 @@ function main_upgrade($oldversion=0) {
         modify_database('',"UPDATE prefix_blog_tag_instance SET timemodified = '".time()."';");
     }
 
+    if ($oldversion < 2006040500) { // Add an index to course_sections that was never upgraded (bug 5100)
+        execute_sql(" CREATE INDEX coursesection ON {$CFG->prefix}course_sections (course,section) ", false);
+    }
+
     return $result;
 }
 
index c47a0eadc63c8cf0695c8afaac0ddaaf24467e65..81230be653bbfbf6f9ec2ffede57203637444982 100644 (file)
@@ -1484,6 +1484,10 @@ function main_upgrade($oldversion=0) {
         modify_database('',"UPDATE prefix_blog_tag_instance SET timemodified = '".time()."';");
     }
 
+    if ($oldversion < 2006040500) { // Add an index to course_sections that was never upgraded (bug 5100)
+        execute_sql(" CREATE INDEX {$CFG->prefix}course_sections_coursesection_idx ON {$CFG->prefix}course_sections (course,section) ", false);
+    }
+
     return $result;
 }
 
index b783b1f0d2a5aaedaa74d641ffea0cbc45a72b0f..c68ad30e8878672bc5b8df506c510ab434ccef7e 100644 (file)
@@ -6,9 +6,9 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-   $version = 2006032900;  // YYYYMMDD = date
+   $version = 2006040500;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
-   $release = '1.6 Beta 1';    // Human-friendly version name
+   $release = '1.6 Beta 2';    // Human-friendly version name
 
 ?>