Upgrade from 3.1 to 3.5

Upgrade from 3.1 to 3.5

by Jayden Tyronian -
Number of replies: 2

I am attempting the upgrade from 3.1 to 3.5, an upgrade our site is compelled to do due to the GDPR requirements.


All has been going to plan except when I get to the the step to do the upgrade via the online interface.


The error I'm getting is:


Debug info: Field 'id' doesn't have a default value
INSERT INTO mdl_task_adhoc (classname,component,nextruntime) VALUES(?,?,?)
[array (
0 => '\\core\\task\\refresh_mod_calendar_events_task',
1 => 'core',
2 => 1526610553,
)]
Error code: dmlwriteexception


Stack trace:

  • line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1300 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1346 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 897 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->insert_record()
  • line 1797 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 518 of /admin/index.php: call to upgrade_core()

Could anyone provide some urgent support/suggestions on why I may be getting this during a 3.1 to 3.5 upgrade.


Thanks you.

Jayden


Average of ratings: -
In reply to Jayden Tyronian

Re: Upgrade from 3.1 to 3.5

by Jayden Tyronian -

It seems to be something with the mysql table mdl_task_adhoc but I don't what needs to be fixed to make the install work past this point and I can't skip it.

In reply to Jayden Tyronian

Re: Upgrade from 3.1 to 3.5

by Jayden Tyronian -

I sorted this out finally the table  (and some others that came up later as the upgrade process continued) needed to have the id field set as unique and have auto incremental turned on for that field.  All worked once that was applied to the applicable tables in myphpadmin