diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 301ea068805..19aef98ca11 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -891,15 +891,10 @@ function xmldb_main_upgrade($oldversion) { $table = new xmldb_table('backup_ids'); // Conditionally launch drop table for backup_ids - // Conditionally launch drop field deleted from course_completion_crit_compl - if ($dbman->field_exists($table2, $field)) { - $dbman->drop_field($table2, $field); + if ($dbman->table_exists($table)) { + $dbman->drop_table($table); } - // Drop unused table "course_completion_notify" - $table = new xmldb_table('course_completion_notify'); - - // Conditionally launch drop table course_completion_notify // Main savepoint reached upgrade_main_savepoint(true, 2012062500.02); } @@ -963,7 +958,7 @@ function xmldb_main_upgrade($oldversion) { // Conditionally launch drop field deleted from course_completions if ($dbman->field_exists($table, $field)) { - $dbman->drop_field($table, $field); + $dbman->drop_field($table, $field); } $field = new xmldb_field('timenotified');