Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
799f3149
Commit
799f3149
authored
4 years ago
by
Seamus Lee
Browse files
Options
Downloads
Patches
Plain Diff
#334
Use the current in use collation and character sets when creating...
#334
Use the current in use collation and character sets when creating new custom value tables
parent
50a7682a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/BAO/CustomField.php
+6
-1
6 additions, 1 deletion
CRM/Core/BAO/CustomField.php
with
6 additions
and
1 deletion
CRM/Core/BAO/CustomField.php
+
6
−
1
View file @
799f3149
...
...
@@ -1610,10 +1610,15 @@ SELECT $columnName
*/
public
static
function
defaultCustomTableSchema
(
$params
)
{
// add the id and extends_id
$collation
=
CRM_Core_BAO_SchemaHandler
::
getInUseCollation
();
$characterSet
=
'utf8'
;
if
(
stripos
(
$collation
,
'utf8mb4'
)
!==
FALSE
)
{
$characterSet
=
'utf8mb4'
;
}
$table
=
[
'name'
=>
$params
[
'name'
],
'is_multiple'
=>
$params
[
'is_multiple'
],
'attributes'
=>
"ENGINE=InnoDB DEFAULT CHARACTER SET
utf8 COLLATE utf8_unicode_ci
"
,
'attributes'
=>
"ENGINE=InnoDB DEFAULT CHARACTER SET
{
$characterSet
}
COLLATE
{
$collation
}
"
,
'fields'
=>
[
[
'name'
=>
'id'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment