tutor icon indicating copy to clipboard operation
tutor copied to clipboard

feat!: upgrade mysql charset and collation to utf8mb4

Open Danyal-Faheem opened this issue 9 months ago • 0 comments

Partially fixes #938.

Changes

  • Changes the default character set of MySQL to utf8mb4 and the default collation to utf8mb4_unicode_ci.
  • Also updated the dosqlshell command to use utf8mb4 as the default character set.

Testing

  • I have tested these changes on tutor dev and tutor K8s. I followed these steps:
    • Ran tutor [dev|k8s] launch
    • Imported the demo course and made sure it was working fine
    • Created admin and student users successfully
    • Created a new course with emojis in the title and in subsection titles and made sure changes were being published and reflected in the LMS

Notes

  • This change only affects new installations of Tutor after this PR is merged.
  • We plan on introducing commands to allow older installations of Tutor to upgrade either all the tables or certain tables in MySQL one by one to utf8mb4 as well but that will probably not be introduced in redwood. It will be introduced in a later release.
  • Certain columns will still default to their charset and collation which are forced in their models. A list of these columns and tables can be found here.

Danyal-Faheem avatar May 16 '24 13:05 Danyal-Faheem