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

Set table collation to match core tables #329

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/CRM/CivixBundle/Command/AddEntityBoilerplateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ private function getDefaultDatabase(): array {
return [
'name' => '',
'attributes' => '',
'tableAttributes_modern' => 'ENGINE=InnoDB',
// These are the attributes used by the vast majority of tables in CiviCRM core (except maybe log or archive tables).
// FIXME: It's not great that this is hard-coded here, but the alternative of leaving this out would be worse
// as the default collation setting in MySQL could be anything & we'd rather be consistent with Civi core tables.
'tableAttributes_modern' => 'ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC',
// Probably unused
'tableAttributes_simple' => 'ENGINE=InnoDB',
// ^^ Set very limited defaults.
// Existing deployments may be inconsistent with respect to charsets and collations, and
// it's hard to attune with static code. This represents a compromise (until we can
// rework the process in a way that clearly addresses the inconsistencies among deployments).
'comment' => '',
];
}
Expand Down