We found out it was two plugins causing the problem: flashcard and hsuforum. Deleted those folders, but now it gives another error (see CURRENT ERROR below). Although we are going to try to reload the database again to see if that error gets taken care of.
Why plugins didn't work with GIT: We are using GIT for our main moodle site, but NOT for the plugins. The plugins had a reference to /lib/eventslib.php which is no longer in Moodle 3.6. Even though we updated the plugins before going to 3.6, it only updated the plugins with the 3.5 version, which still referenced this file.
Now this message. Time for more google searching. I also copied the information below for the git branch -a and fgrep '$release' version.php
CURRENT ERROR:
Error writing to database
More information about this error
Debug info: Duplicate entry '693-67' for key 'mdl_messuserbloc_useblo_uix'
INSERT INTO mdl_message_users_blocked (userid, blockeduserid, timecreated)
SELECT userid, contactid, null as timecreated
FROM mdl_message_contacts
WHERE blocked = ?
[array (
0 => 1,
)]
Error code: dmlwriteexception
×
Stack trace:- line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 1139 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 2466 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->execute()
- line 1793 of /lib/upgradelib.php: call to xmldb_main_upgrade()
- line 518 of /admin/index.php: call to upgrade_core()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
root@uc-moodlet:/var/www/html/moodle# git branch -a
* MOODLE_36_STABLE
master
remotes/origin/HEAD -> origin/master
remotes/origin/MOODLE_13_STABLE
remotes/origin/MOODLE_14_STABLE
remotes/origin/MOODLE_15_STABLE
remotes/origin/MOODLE_16_STABLE
remotes/origin/MOODLE_17_STABLE
remotes/origin/MOODLE_18_STABLE
remotes/origin/MOODLE_19_STABLE
remotes/origin/MOODLE_20_STABLE
remotes/origin/MOODLE_21_STABLE
remotes/origin/MOODLE_22_STABLE
remotes/origin/MOODLE_23_STABLE
remotes/origin/MOODLE_24_STABLE
remotes/origin/MOODLE_25_STABLE
remotes/origin/MOODLE_26_STABLE
remotes/origin/MOODLE_27_STABLE
remotes/origin/MOODLE_28_STABLE
remotes/origin/MOODLE_29_STABLE
remotes/origin/MOODLE_30_STABLE
remotes/origin/MOODLE_31_STABLE
remotes/origin/MOODLE_32_STABLE
remotes/origin/MOODLE_33_STABLE
remotes/origin/MOODLE_34_STABLE
remotes/origin/MOODLE_35_STABLE
remotes/origin/MOODLE_36_STABLE
remotes/origin/MOODLE_37_STABLE
remotes/origin/master
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
root@uc-moodlet:/var/www/html/moodle# fgrep '$release' version.php
$release = '3.6.5+ (Build: 20190712)'; // Human-friendly version name