Repository navigation
fix: align the course_overview_id collation in migration 0007 - #626
mariajgrimaldi wants to merge 2 commits into
Conversation
|
Thanks for the pull request, @mariajgrimaldi! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
15e7bb1 to
1559f4f
Compare
1559f4f to
7b0a57b
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
f93fde9 to
204a061
Compare
Description
Migration
0007_coursescopefails with MySQL error 3780 on databases whose default collation isutf8mb4_0900_ai_ci, such as MySQL 8 and AWS RDS, which blocks the upgrade to Verawood. MySQL needs the same collation on both columns of a foreign key between strings (MySQL foreign key constraints), whilecourse_overview_idgetsutf8mb4_unicode_cifrom opaque-keys (opaque-keys#426) and the platform'scourse_overviews_courseoverview.idkeeps the database default.On MySQL,
0007now givescourse_overview_idthe collation of the column it references before Django creates the foreign key, and it does nothing on other databases or when the collations already match. The migration state doesn't change, so instances that already applied0007see no new migration, and the same fix goes to Verawood as1.23.1in #639.Closes #593.
How to Test
Save the plugin and the script below in one folder and run
chmod +x test-issue-593.sh. The plugin runs MySQL 8.0 with its default collationutf8mb4_0900_ai_ci, as AWS RDS does, and the script prints each command and check it runs. Eachinittakes a few minutes../test-issue-593.sh ulmoinstalls Ulmo with one course../test-issue-593.sh upgrademoves to Verawood (openedx-authz==1.23.0), andinitstops at0007_coursescopewith error 3780, as in openedx_authz.0007_coursescope fails with MySQL error 3780 on databases whose default collation is not utf8mb4_unicode_ci (e.g. MySQL 8 default utf8mb4_0900_ai_ci) #593../test-issue-593.sh recoverruns the checks of the how-to and, after you answery, drops the table../test-issue-593.sh mainmoves to Tutor main, installs this branch, applies0007to0012and runsinit, which finishes. Both columns areutf8mb4_0900_ai_ciand the foreign key exists../test-issue-593.sh roleassigns a course role and printsTrue.Tutor plugin
issue593_mysql.ymlHelper script
test-issue-593.shMerge checklist:
Check off if complete or not applicable: