Error upgrading from 1.9 to 2.1

Error upgrading from 1.9 to 2.1

by Michael Falcone -
Number of replies: 1

I get an error writing to database error. Hopefully somebody can help me. the debuggind info starts with:

Debug info: Data too long for column 'questiontext' at row 1
UPDATE question SET category = ?,parent = ?,name = ?,questiontext = ?,questiontextformat = ?,generalfeedback = ?,oldquestiontextformat = ?,generalfeedbackformat = ?,defaultgrade = ?,penalty = ?,qtype = ?,length = ?,stamp = ?,version = ?,hidden = ?,timecreated = ?,timemodified = ?,createdby = ?,modifiedby = ? WHERE id=?

 

and several pages later ends with:

 

Stack trace:
  • line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 984 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1016 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
  • line 5136 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->update_record()
  • line 1423 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 277 of /admin/index.php: call to upgrade_core()
Average of ratings: -
In reply to Michael Falcone

Re: Error upgrading from 1.9 to 2.1

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Personally.... I would restore your 1.9 site (I hope you took backups).

You don't say which 1.9 version this is, but if it isn't the latest upgrade to that. Then upgrade to the latest 2.0 and then to 2.1.

If you haven't done so already, you should read http://docs.moodle.org/20/en/Upgrading_to_Moodle_2.0. There's some important advice in there, particularly the bit about checking your database schema if your site is 'old'.