Column reverted to non-unicode

1 year 3 months ago #332454 by kdave321
Column reverted to non-unicode was created by kdave321
A while ago I had to fix various columns in CB tables that didn't support unicode ( foreign language characters ).

ALTER TABLE #_groupjive_groups  MODIFY name text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

It has been working fine for many, many months but today I just noticed the column reverted back to its original collation "latin1_swedish_ci", losing all the Thai names I had stored in there.

How did this happen?  How to stop it from happening again?

Please Log in to join the conversation.

1 year 3 months ago #332467 by krileon
Replied by krileon on topic Column reverted to non-unicode
We don't touch collation. On install of a plugin when its database is created the collation will be whatever your database default collation is. You should be sure all your tables are set to utf8mb4_unicode_ci then be sure your database itself is configured properly by changing the default collation of your database.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 3 months ago #332486 by kdave321
Replied by kdave321 on topic Column reverted to non-unicode
I have not changed the database default character set, so if a column is recreated, it will get the default.  Perhaps there are some other situations too, of which I am unaware, where the collation is reset. (Mariadb on Linux)

But the plot thickens. I changed collation of both name and description in that table - and the description collation hasn't changed! It's not something my hosting provider would have done to me, as it happened on both local and hosted sites when I did the last CB upgrade.

 

Please Log in to join the conversation.

1 year 3 months ago #332489 by krileon
Replied by krileon on topic Column reverted to non-unicode
The easiest fix is to fix your default collation in your database. The default is probably set to latin1_swedish_ci.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 3 months ago #332508 by kdave321
Replied by kdave321 on topic Column reverted to non-unicode
will do. thanks.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.207 seconds

Facebook Twitter LinkedIn