mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-22366 upgrade - always drop DB objects conditionally
This commit is contained in:
parent
3799dcb927
commit
5cada36315
@ -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');
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user