fix(db): add explicit collation for icon map migration - #1944
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
|
| Layer / File(s) | Summary |
|---|---|
Temporary table collation declaration backend/src/main/resources/db/migration/V144__Migrate_entity_icons_to_lucide.sql |
The prime_to_lucide_icon_map table creation now explicitly declares CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci. |
Join condition collation fixes backend/src/main/resources/db/migration/V144__Migrate_entity_icons_to_lucide.sql |
The LEFT JOIN ON conditions for library, shelf, and magic_shelf updates now apply COLLATE utf8mb4_general_ci to the prime_icon comparison, with SET and WHERE clauses unchanged. |
Estimated code review effort: 1 (Trivial) | ~5 minutes
Suggested labels: backend, enhancement
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title follows conventional commit format and clearly describes the migration collation fix. |
| Description check | ✅ Passed | All required sections are present and the description explains the fix, issue link, changes, and verification steps. |
| Linked Issues check | ✅ Passed | The migration changes address the MariaDB collation mismatch described in #1943 by forcing utf8mb4_general_ci where needed. |
| Out of Scope Changes check | ✅ Passed | The changes stay focused on the V144 migration collation fix and do not introduce unrelated code. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
✨ Simplify code
- Create PR with simplified code
Warning
Review ran into problems
🔥 Problems
Linked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped grimmory-tools/grimmory-docs.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
…cons_to_lucide.sql Co-authored-by: James Ward <james@notjam.es>
Description
The icons migration can fail with older databases with tables generated under a different collation (unicode_ci). This fixes the issue with explicit general_ci collations for the icon mapping.
This patches the existing v144 migration. There's no impact on existing / working users, and it should fix any issues for people who have updated and experienced issues, as well as anyone updating normally.
Linked Issue
Fixes #1943
Changes
Add explicit
general_cicollation for the icon maps instead of inheriting the user's shelf/magic shelf table collation.Manual Testing Steps
Migrate with a shelf/magic shelf table set to
unicode_ci, confirm the migration works without issue.Screenshots (Optional)
N/A
Additional Context (Optional)
N/A
AI Disclosure
N/A
Checklist
just ui checkandjust api check.Summary by CodeRabbit