Skip to content
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

chore(db): set collation specific to mariadb and fix phinx configuration #5013

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tuxpiper
Copy link
Member

@tuxpiper tuxpiper commented Nov 11, 2024

This pull request makes the following changes:

  • Sets the server collation in local environment to utf8_unicode_520_ci , which is based on UCA 5.2.0 weight keys (http://www.unicode.org/Public/UCA/5.2.0/allkeys.txt) (as opposed to UCA 4.0 in utf8_generic_ci). It should sort alphabets more reliably.
  • Addresses a configuration flaw in phinx , which would ignore the character set configuration at the time of creating tables. So it seems that setting the collation is required.

Test checklist:

  • run make start

  • connect to the database and run SHOW TABLE STATUS where name like '%'; , the collation should be utf8mb4_unicode_520_ci .
    ( if you do this before applying the changes, you would see that the collation is utf8_* , or utf8mb3_* , which means we'd using a 3-byte charset that will not accept all the emojis 🤔😓🤮💣😵 and other higher-page characters )

  • I certify that I ran my checklist

Fixes USH-1670

Ping @ushahidi/platform

Copy link

linear bot commented Nov 11, 2024

Copy link
Contributor

@Mh-Asmi Mh-Asmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants