mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #11431 from maxime-rainville/pulls/6/remove-legacy-charset-setting
ENH Default DB settings to use 4 bytes to store UTF8 characters
This commit is contained in:
commit
8845794012
@ -10,7 +10,6 @@ use SilverStripe\Model\List\PaginatedList;
|
|||||||
use SilverStripe\ORM\DataList;
|
use SilverStripe\ORM\DataList;
|
||||||
use SilverStripe\Model\List\ArrayList;
|
use SilverStripe\Model\List\ArrayList;
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\ORM\Queries\SQLSelect;
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,7 +30,7 @@ class MySQLDatabase extends Database implements TransactionManager
|
|||||||
* @config
|
* @config
|
||||||
* @var String
|
* @var String
|
||||||
*/
|
*/
|
||||||
private static $connection_charset = 'utf8';
|
private static $connection_charset = 'utf8mb4';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default connection collation
|
* Default connection collation
|
||||||
@ -39,7 +38,7 @@ class MySQLDatabase extends Database implements TransactionManager
|
|||||||
* @config
|
* @config
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $connection_collation = 'utf8_general_ci';
|
private static $connection_collation = 'utf8mb4_unicode_ci';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default charset
|
* Default charset
|
||||||
@ -47,7 +46,7 @@ class MySQLDatabase extends Database implements TransactionManager
|
|||||||
* @config
|
* @config
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $charset = 'utf8';
|
private static $charset = 'utf8mb4';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL Mode used on connections to MySQL. Defaults to ANSI. For basic ORM
|
* SQL Mode used on connections to MySQL. Defaults to ANSI. For basic ORM
|
||||||
@ -73,7 +72,7 @@ class MySQLDatabase extends Database implements TransactionManager
|
|||||||
* @config
|
* @config
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $collation = 'utf8_general_ci';
|
private static $collation = 'utf8mb4_unicode_ci';
|
||||||
|
|
||||||
public function connect($parameters)
|
public function connect($parameters)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user