-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL Data Too Long Error During Forum Migration from MongoDB to MySQL #62
Comments
The problem originates from the fact that mongodb doesn't enforce limits on fields individually, whereas in MySQL we have that limit. Currently, the limit is 255 (Charfield). Should we update the @regisb @Ali-Salman29 what do you guys suggest? |
I might be naive, but I think it does make sense to keep a limit on title lengths. Otherwise any user could fill the database with arbitrary long fields. Here's what I suggest:
|
Does this require any action in tutor-forum? This looks like an upstream issue rather than tutor-forum. |
Yes, this is an issue for openedx/forum. @taimoor-ahmed-1 can you please migrate or copy the issue there? |
Created the issue over openedx/forum |
I have assigned this to myself over at forum, will open a PR soon |
Closing this issue as this is an upstream issue that is being tracked on openedx/forum#165 |
While migrating forum data from MongoDB to MySQL using the following command:
tutor local run lms ./manage.py lms forum_migrate_course_from_mongodb_to_mysql --no-toggle all
I encountered a Data Too Long for Column 'title' error. It seems MySQL is not accepting longer titles, and we might need to increase the column length.
Error Log:
Steps to Reproduce:
Expected Behavior:
The migration should successfully transfer data from MongoDB to MySQL without truncation or errors.
Actual Behavior:
The migration fails due to a MySQL DataError (1406), indicating that the title field length is exceeding the allowed limit.
The text was updated successfully, but these errors were encountered: