Hello,
I am upgrading a backup of our site as an exercise before attempting the real thing with our live system. I have jumped through all the various hoops along the way, upgrading the database, Barracuda, dealing with all the various issues and then this happens:
While running the upgrade process using the CLI interface, I got an error alerting me that mdl_tool_cohortrules doesn't exist.
I thought initially I did a poor job backing up and restoring the database to a new database, maybe I forgot a table, but no, the database I am upgrading from the original one does not have this table.
If the table did not exist before then why is it being referenced in an upgrade installation? Sounds to me like this is the cart before the horse.
Anyone with some helpful information, please chime in! It goes without saying that my site is now unable to be updated, and fairly certain I can't roll it back since I've done so much to get to this point. How do I progress from this?
I've included the dialogue that existed in the CLI interface
C:\Websites\moodle.3.8>php c:/websites/moodle.3.8/website/admin/cli/maintenance.php --disable == Maintenance mode (https://<redacted>) == Maintenance mode has been disabled and the site is running normally again C:\Websites\moodle.3.8>php c:/websites/moodle.3.8/website/admin/cli/upgrade.php == Upgrading Moodle database from version 3.6.1+ (Build: 20181220) (2019042300.01) to 3.8.1+ (Build: 20200124) (2019111801.03) == Your Moodle files have been changed, and you are about to automatically upgrade your server to this version: 3.8.1+ (BUILD: 20200124) (2019111801.03) Once you do this you can not go back again. Please note that this process can take a long time. Are you sure you want to upgrade this server to this version? type y (means yes) or n (means no) : y -->Language import utility: en_us ++ Language pack 'en_us' is up-to-date ++ -->System !!! Error writing to database !!! !! Table 'moodle.new.mdl_tool_cohortroles' doesn't exist DELETE FROM mdl_tool_cohortroles WHERE roleid NOT IN (SELECT id FROM mdl_role) [array ( )] Error code: dmlwriteexception !! !! Stack trace: * line 489 of \lib\dml\moodle_database.php: dml_write_exception thrown * line 1660 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 3792 of \lib\db\upgrade.php: call to mysqli_native_moodle_database->delete_records_select() * line 1817 of \lib\upgradelib.php: call to xmldb_main_upgrade() * line 187 of \admin\cli\upgrade.php: call to upgrade_core() !!