1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-15 05:00:06 +01:00

The custom function to convert the user table hasn't to drop/create indexes anymore.

It's handled automatically by the main utf8 script.
This commit is contained in:
stronk7 2006-09-03 19:20:01 +00:00
parent 763989c0d6
commit 71c143f41e

@ -30,6 +30,11 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
/// Drop index here /// 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) { if ($dropindex) {
$SQL = 'ALTER TABLE '.$CFG->prefix.'user DROP INDEX '.$dropindex.';'; $SQL = 'ALTER TABLE '.$CFG->prefix.'user DROP INDEX '.$dropindex.';';
$SQL1 = 'ALTER TABLE '.$CFG->prefix.'user DROP INDEX '.$CFG->prefix.$dropindex.';'; // see bug 5205 $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($SQL, false); // see bug 5205
execute_sql($SQL1, false); // see bug 5205 execute_sql($SQL1, false); // see bug 5205
} } */
/// Change column encoding here /// Change column encoding here
@ -183,6 +188,12 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
} }
/// Add index back /// 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; $alter = 0;
$SQL = 'ALTER TABLE '.$CFG->prefix.'user'; $SQL = 'ALTER TABLE '.$CFG->prefix.'user';
@ -213,13 +224,11 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords, $done, $tablest
$db->debug=0; $db->debug=0;
} }
} }
/// Done adding index back /// Done adding index back */
} }
function migrate2utf8_role_name($recordid){ function migrate2utf8_role_name($recordid){
global $CFG, $globallang; global $CFG, $globallang;