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

Dev build doesn't update encoding settings for tables and database #9586

Open
mfendeksilverstripe opened this issue Jul 9, 2020 · 0 comments

Comments

@mfendeksilverstripe
Copy link
Contributor

mfendeksilverstripe commented Jul 9, 2020

Affected Version

SilverStripe 4.6-rc1

Description

It seems that dev/build doesn't update database and table encoding settings.

Steps to Reproduce

  • setup a project with default encoding settings
  • change the encoding setting s to the following:
SilverStripe\ORM\Connect\MySQLDatabase:
  connection_charset: utf8mb4
  connection_collation: utf8mb4_unicode_ci
  charset: utf8mb4
  collation: utf8mb4_unicode_ci

Expected result

  • encoding for database, tables, fields and indexes get updated

Actual result

  • encoding for fields and indexes get updated
  • database and table settings do not get updated

Note that recreating database from scratch and running dev build will produce correct encoding setup for database and fields. The problem seems to be just the update.

Workaround

Run the following query manually to update encoding in your database:

ALTER TABLE <table-name> CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants