WeBWorK Main Forum

Data too long for column error while using upgrade-database-to-utf8mb4.pl

Re: Data too long for column error while using upgrade-database-to-utf8mb4.pl

by Andras Balogh -
Number of replies: 3
1. I am sorry, but you mention "a" course that is live. That particular course was not live, but others are. My question is whether or not the other course data will be affected by restoring the backup. Since the webwork.sql file is 2.5G, I suspect that it is the backup of all the courses, not just the one specific course, and restoring will affect the other courses.

2. When the upgrade-database-to-utf8mb4.pl bailed out on the one course, was the data of the other courses effected, or can I just simply delete the specific one course and go on with the rest of the courses without restoring from the hours old backup?
In reply to Andras Balogh

Re: Data too long for column error while using upgrade-database-to-utf8mb4.pl

by Danny Glin -
Yes, restoring the backup will overwrite all courses on the server.

There are no guarantees as to what state the database is in if the upgrade script exited with errors. There's a pretty good chance that the other courses are fine, but it's still possible that the error caused some actions not to be completed on other courses.

Remember that if you delete the set with a name longer than 100 characters that you are also deleting all student progress associated with that set, so save any necessary data first.
In reply to Andras Balogh

Re: Data too long for column error while using upgrade-database-to-utf8mb4.pl

by Glenn Rice -

To add to what Danny said and to answer your second question, yes, you can just delete the course and go on with the rest of the courses without restoring the backup.  The script will only touch the course you specified when you ran the script (assuming you specified a course and weren't running the script for all courses).  Most likely it will be okay even if you were running the script for all courses, but no guarantees there.