diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 40be53e8751..06295e35d4b 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -101,7 +101,9 @@ function xmldb_main_upgrade($oldversion) { $index = new xmldb_index('contextid-lowerboundary', XMLDB_INDEX_NOTUNIQUE, array('contextid', 'lowerboundary')); /// Launch drop index contextid-lowerboundary - $dbman->drop_index($table, $index); + if ($dbman->index_exists($table, $index)) { + $dbman->drop_index($table, $index); + } /// Define index contextid-lowerboundary-letter (unique) to be added to grade_letters $table = new xmldb_table('grade_letters'); diff --git a/lib/ddl/database_manager.php b/lib/ddl/database_manager.php index 196c2a07aca..0e288fafcf2 100644 --- a/lib/ddl/database_manager.php +++ b/lib/ddl/database_manager.php @@ -907,7 +907,7 @@ class database_manager { if (!$this->index_exists($xmldb_table, $xmldb_intex)) { throw new ddl_exception('ddlunknownerror', null, 'Index ' . $xmldb_table->getName() . '->' . $xmldb_intex->getName() . - ' does not exist. Delete skipped'); + ' does not exist. Drop skipped'); } if (!$sqlarr = $this->generator->getDropIndexSQL($xmldb_table, $xmldb_intex)) {