]> git.mjollnir.org Git - moodle.git/commitdiff
Replaced prefix_ with CFG->prefix for DROP of indexes before creation because of...
authormjollnir_ <mjollnir_>
Thu, 18 Nov 2004 02:39:16 +0000 (02:39 +0000)
committermjollnir_ <mjollnir_>
Thu, 18 Nov 2004 02:39:16 +0000 (02:39 +0000)
mod/choice/db/mysql.php
mod/choice/db/postgres7.php

index 68438233dbb8ef119443dc6e7a425e670e19c498..839e4d335d7448942bc25b3e8892915f34cb5798 100644 (file)
@@ -44,9 +44,9 @@ function choice_upgrade($oldversion) {
     }
 
     if ($oldversion < 2004111200){  // drop first to avoid conflicts when upgrading from 1.4+
-        execute_sql('ALTER TABLE prefix_choice DROP INDEX course;',false);
-        execute_sql('ALTER TABLE prefix_choice_answers DROP INDEX choice;',false);
-        execute_sql('ALTER TABLE prefix_choice_answers DROP INDEX userid;',false);
+        execute_sql("ALTER TABLE {$CFG->prefix}choice DROP INDEX course;",false);
+        execute_sql("ALTER TABLE {$CFG->prefix}choice_answers DROP INDEX choice;",false);
+        execute_sql("ALTER TABLE {$CFG->prefix}choice_answers DROP INDEX userid;",false);
 
         modify_database('','ALTER TABLE prefix_choice ADD INDEX course (course);');
         modify_database('','ALTER TABLE prefix_choice_answers ADD INDEX choice (choice);');
index 4c126e2d9c8247fd318d876e0cb8879379fbae87..a2e57dac4ed4998f73de2a7af1d17adbc8746c6e 100644 (file)
@@ -30,9 +30,9 @@ function choice_upgrade($oldversion) {
     }
 
     if ($oldversion < 2004111200) { // drop first to avoid conflicts when upgrading from 1.4+
-        execute_sql('DROP INDEX prefix_choice_course_idx;',false);
-        execute_sql('DROP INDEX prefix_choice_answers_choice_idx;',false);
-        execute_sql('DROP INDEX prefix_choice_answers_userid_idx;',false);
+        execute_sql("DROP INDEX {$CFG->prefix}choice_course_idx;",false);
+        execute_sql("DROP INDEX {$CFG->prefix}choice_answers_choice_idx;",false);
+        execute_sql("DROP INDEX {$CFG->prefix}choice_answers_userid_idx;",false);
 
         modify_database('','CREATE INDEX prefix_choice_course_idx ON prefix_choice (course);');
         modify_database('','CREATE INDEX prefix_choice_answers_choice_idx ON prefix_choice_answers (choice);');