studentquiz / moodle-mod_studentquiz

Moodle-Plugin
GNU General Public License v3.0
38 stars 37 forks source link

Update to V5.0.0: Writing to database error #418

Closed mattgig closed 1 year ago

mattgig commented 1 year ago

When I try to update an existing StudentQuiz installation to version V5.0.0 under Moodle 4.0.4 I get a writing to database error:

Debug info: Field 'questionid' doesn't have a default value INSERT INTO MDL_studentquiz_state_history (userid,state,timecreated) VALUES(?,?,?) [array ( 0 => 2, 1 => 2, 2 => 1593437350, )] Error code: dmlwriteexception

*I use a different prefix instead of MDL.

In case you need some additional information I can investigate further in a few hours.

mattgig commented 1 year ago

Just run the installation process again. The second time it worked. Don't know why it wouldn't work the first time.

timhunt commented 1 year ago

What is also odd is that I can't see where in the upgrade code is anything that would lead to that. If you had a stack trace for the error, that would help.

Anyway, I am glad it worked the second time.

Shall we just close this?

mattgig commented 1 year ago

Yes, please do so. Sorry for the inconvenience.

timhunt commented 1 year ago

No worries. Thank you for taking the time to contribute to StudentQuiz, even if it turned out to be a false alarm this time.