]> git.mjollnir.org Git - moodle.git/commitdiff
The custom function to convert the user table hasn't to drop/create indexes anymore.
authorstronk7 <stronk7>
Sun, 3 Sep 2006 19:20:01 +0000 (19:20 +0000)
committerstronk7 <stronk7>
Sun, 3 Sep 2006 19:20:01 +0000 (19:20 +0000)
It's handled automatically by the main utf8 script.

lib/db/migrate2utf8.php

index d3e3862737a34526abd12cb70101b2e57b02feef..9d0baa7c4bbcd0489a31fab8bc638e1d3329f616 100755 (executable)
@@ -30,6 +30,11 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
 
         /// Drop index here
 
+        /* Note: we aren't going to drop indexes from migration
+           functions anymore. The main script is responsible for
+           both dropping and recreating all the indexes present
+           in each table
+           
         if ($dropindex) {
             $SQL = 'ALTER TABLE '.$CFG->prefix.'user DROP INDEX '.$dropindex.';';
             $SQL1 = 'ALTER TABLE '.$CFG->prefix.'user DROP INDEX '.$CFG->prefix.$dropindex.';'; // see bug 5205
@@ -38,7 +43,7 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
             }
             execute_sql($SQL, false); // see bug 5205
             execute_sql($SQL1, false); // see bug 5205
-        }
+        } */
 
         /// Change column encoding here
 
@@ -183,6 +188,12 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
     }
     
     /// Add index back
+
+    /* Note: we aren't going to drop indexes from migration
+       functions anymore. The main script is responsible for
+       both dropping and recreating all the indexes present
+       in each table
+
     $alter = 0;
     $SQL = 'ALTER TABLE '.$CFG->prefix.'user';
 
@@ -213,13 +224,11 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
             $db->debug=0;
         }
     }
-    /// Done adding index back
+    /// Done adding index back */
 
 }
 
 
-
-
 function migrate2utf8_role_name($recordid){
     global $CFG, $globallang;