Upgrade Error 1.9.8+ to 2.0

Upgrade Error 1.9.8+ to 2.0

by Mat Cannings -
Number of replies: 1

I have just tried upgrading a virtual clone of one of my servers and have run into the error at the bottom of the post. I have browsed all of the tables that the query mentions and can't spot any obvious problems in the structure. I have also run the query manually which initially changed 11 rows but does not change any now.

If any one could offer some assistance it would be gratefully appreciated.


System

Debug info: Column was set to data type implicit default; NULL supplied for NOT NULL column 'itemid' at row 3
UPDATE mdl_role_assignments
SET itemid = (SELECT MIN(mdl_enrol.id)
FROM mdl_enrol
JOIN mdl_context ON (mdl_context.contextlevel = 50 AND mdl_context.instanceid = mdl_enrol.courseid)
WHERE mdl_role_assignments.component = CONCAT('enrol_', mdl_enrol.enrol) AND mdl_context.id = mdl_role_assignments.contextid)
WHERE component <> 'enrol_manual' AND component LIKE 'enrol_%'
[array (
)]
Stack trace:
  • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 672 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 4419 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->execute()
  • line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 252 of /admin/index.php: call to upgrade_core()
Average of ratings: -