-
-
Notifications
You must be signed in to change notification settings - Fork 827
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/core#334 Use the current in use collation and character sets when… #18642
dev/core#334 Use the current in use collation and character sets when… #18642
Conversation
(Standard links)
|
CRM/Core/BAO/CustomField.php
Outdated
@@ -1610,10 +1610,15 @@ public static function formatCustomField( | |||
*/ | |||
public static function defaultCustomTableSchema($params) { | |||
// add the id and extends_id | |||
$collation = CRM_Core_BAO_SchemaHandler::getInUseCollation(); | |||
$characterSet = 'utf8'; | |||
if (stristr($collaction, 'utf8mb4')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo.
And I'd probably use stripos but that's less important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, collaction
→ collation
Great! Thanks for this, it was a real head scratcher for me doing migration work: I'd run the conversion script, think it was all utf8mb4 for sure, then my import script which adds custom fields would throw a 🔧 into the ⚙️ whenever it encountered a 🔧 or a ⚙️ or a 💅
|
… creating new custom value tables
c244d48
to
799f314
Compare
going to add Merge on pass based on @artfulrobot testing |
… creating new custom value tables
Overview
This changes the default attributes for new custom value tables to be dependant on the current in use collation.
Before
Only utf8 charset and utf8_unicode_ci collation were used to create new custom tables
After
Uses the relevant charset for the current collation of the civicrm_contact table.
ping @demeritcowboy @artfulrobot @mattwire