From 717e4877d3c09951516185b4aa70f66b0966b4bc Mon Sep 17 00:00:00 2001 From: Nathan He Date: Wed, 29 Apr 2020 14:57:46 -0500 Subject: [PATCH] Add check for existing table upgrade script --- db/upgrade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/upgrade.php b/db/upgrade.php index 4788af3..df84baa 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -38,8 +38,9 @@ function xmldb_block_acclaim_upgrade($oldversion) { $table = new xmldb_table('block_acclaim'); // Launch rename table for block_acclaim_courses. - $dbman->rename_table($table, 'block_acclaim_courses'); - + if ($dbman->table_exists($table)) { + $dbman->rename_table($table, 'block_acclaim_courses'); + } // Acclaim savepoint reached. upgrade_block_savepoint(true, 2020042200, 'acclaim'); }