I would greatly appreciate any advice, as I've been trialling Moodle for a while and it looks ideal for our organisation. I've followed one of the guides on upgrading whereby the moodle code for 3.7 has been backed up, removed and replaced by the the new code for 3.8.1. The moodledata folder is kept separate as recommended.
Then I downloaded and copied in the latest versions of the handful of plugins that we've been using. This involved several rounds of "Upgrading to new version" where moodle was upgrading a few of these at a time, and the displays indicated that these were successful, and would then show whichever other components were for upgrading, and all of these seemed to upgrade OK. Then it got to a point where it showed that no plugins require attention. But the "admin" user cant get any further, so all I can do is click "Upgrade moodle database" and now I'm seeing errors such as the one below. I admit that I did not use "Maintenance mode" while doing the above, but this system is not in "production". It's been for demonstration with a view to eventually setting up for production.
My other users (Trainer / Students etc) are still able to logon and can do their stuff, but clearly administrative access is now impossible. Also it seems that the cron scheduled tasks cant run. When I run that manually, it states that it won't run as an upgrade is pending. So if something is broken, I cant be sure if this could have knock-on effects elsewhere.
I guess I'm wondering if this is fixable, or would I be better off starting off a new instance from scratch and trying to bring everything over.
Thanks in advance for any insight or comments.
DDL sql execution error
Debug info: Table 'mdl_quiz_statistics' already exists
id BIGINT(10) NOT NULL auto_increment,
hashcode VARCHAR(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
whichattempts SMALLINT(4) NOT NULL,
timemodified BIGINT(10) NOT NULL,
firstattemptscount BIGINT(10) NOT NULL,
highestattemptscount BIGINT(10) NOT NULL,
lastattemptscount BIGINT(10) NOT NULL,
allattemptscount BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
ENGINE = InnoDB
DEFAULT COLLATE = utf8mb4_unicode_ci ROW_FORMAT=Compressed
COMMENT='table to cache results from analysis done in statistics repo'
Error code: ddlexecuteerror
- line 492 of \lib\dml\moodle_database.php: ddl_change_structure_exception thrown
- line 1072 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 77 of \lib\ddl\database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
- line 425 of \lib\ddl\database_manager.php: call to database_manager->execute_sql_arr()
- line 370 of \lib\ddl\database_manager.php: call to database_manager->install_from_xmldb_structure()
- line 614 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
- line 1877 of \lib\upgradelib.php: call to upgrade_plugins()
- line 694 of \admin\index.php: call to upgrade_noncore()