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

Changed persistent-mysql to use 'utf8mb4' instead of 'utf8' in migrations #980

Merged
merged 1 commit into from
Jan 3, 2020

Conversation

charukiewicz
Copy link
Contributor

As stated in title, this changes migration behavior for the VARCHAR and TEXT column types to use the uft8mb4 character set as opposed to uft8. This is because utf8 is an alias for utf8mb3 which does not properly handle all UTF-8 strings. Here's another StackOverflow answer that discusses this.

Not sure if this is worth a version number bump, as utf8mb4 is fully backwards compatible. Let me know if I should bump the version.


Before submitting your PR, check that you've:

  • Bumped the version number

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

… SET in VARCHAR and TEXT migrations

Co-authored-by: charukiewicz <c.charukiewicz@gmail.com>
Co-authored-by: belevy <benjaminlevy007@gmail.com>
@parsonsmatt
Copy link
Collaborator

I'm happy with this change. Is it a drop-in 100% improvement with no possible breaking change behavior?

@charukiewicz
Copy link
Contributor Author

As far as I know, yes. utf8mb4 is a superset of what MySQL calls utf8, which is an alias for utf8mb3. This means a maximum of 4 bytes instead of 3 bytes. Everything else will work the same way.

@parsonsmatt
Copy link
Collaborator

awesome! I'll try to get this released this weekend.

@parsonsmatt parsonsmatt merged commit 09b7979 into yesodweb:master Jan 3, 2020
@parsonsmatt
Copy link
Collaborator

Released as persistent-2.10.2.1

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

Successfully merging this pull request may close these issues.

None yet

2 participants