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

ENH Default DB settings to use 4 bytes to store UTF8 characters #11431

Merged
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
9 changes: 4 additions & 5 deletions src/ORM/Connect/MySQLDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use SilverStripe\ORM\DataList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\Queries\SQLSelect;
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
use Exception;

/**
Expand All @@ -31,23 +30,23 @@ class MySQLDatabase extends Database implements TransactionManager
* @config
* @var String
*/
private static $connection_charset = 'utf8';
private static $connection_charset = 'utf8mb4';

/**
* Default connection collation
*
* @config
* @var string
*/
private static $connection_collation = 'utf8_general_ci';
private static $connection_collation = 'utf8mb4_unicode_ci';

/**
* Default charset
*
* @config
* @var string
*/
private static $charset = 'utf8';
private static $charset = 'utf8mb4';

/**
* SQL Mode used on connections to MySQL. Defaults to ANSI. For basic ORM
Expand All @@ -73,7 +72,7 @@ class MySQLDatabase extends Database implements TransactionManager
* @config
* @var string
*/
private static $collation = 'utf8_general_ci';
private static $collation = 'utf8mb4_unicode_ci';

public function connect($parameters)
{
Expand Down