-
Bug
-
Resolution: Fixed
-
Minor
-
3.6.1, 3.7.4, 3.8.1, 3.9
-
MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
Seen in multiple MC sites, the upgrade to 3.6.1 fails because a row in tool_usertours_tours has a sortorder of -1. manually updating the table and setting sortorder of 0 (or some other positive int) causes upgrade to succeed.
stack trace:
|
Default exception handler: Error writing to database Debug: ERROR: null value in column "name" violates not-null constraint
|
DETAIL: Failing row contains (7, null, null, null, null, 4, null).
|
INSERT INTO m_tool_usertours_tours (name,description,pathmatch,enabled,sortorder,configdata) VALUES($1,$2,$3,$4,$5,$6) RETURNING id
|
[array (
|
\'name\' => NULL,
|
\'description\' => NULL,
|
\'pathmatch\' => NULL,
|
\'enabled\' => NULL,
|
\'sortorder\' => 4,
|
\'configdata\' => \'null\',
|
)]
|
Error code: dmlwriteexception
|
* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
* line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
|
* line 969 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
* line 1017 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
|
* line 521 of /admin/tool/usertours/classes/tour.php: call to pgsql_native_moodle_database->insert_record()
|
* line 734 of /admin/tool/usertours/classes/manager.php: call to tool_usertours\\tour->persist()
|
* line 859 of /admin/tool/usertours/classes/manager.php: call to tool_usertours\\manager::_move_tour()
|
* line 52 of /admin/tool/usertours/db/upgrade.php: call to tool_usertours\\manager::update_shipped_tours()
|
* line 636 of /lib/upgradelib.php: call to xmldb_tool_usertours_upgrade()
|
* line 1857 of /lib/upgradelib.php: call to upgrade_plugins()
|
* line 186 of /admin/cli/upgrade.php: call to upgrade_noncore()
|