From: stronk7 Date: Sun, 3 Sep 2006 19:20:01 +0000 (+0000) Subject: The custom function to convert the user table hasn't to drop/create indexes anymore. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=71c143f41e3e58bfb8571c770200ac74a395b5b6;p=moodle.git The custom function to convert the user table hasn't to drop/create indexes anymore. It's handled automatically by the main utf8 script. --- diff --git a/lib/db/migrate2utf8.php b/lib/db/migrate2utf8.php index d3e3862737..9d0baa7c4b 100755 --- a/lib/db/migrate2utf8.php +++ b/lib/db/migrate2utf8.php @@ -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;