Database: Always use `utf8mb4` as connection charset
This commit is contained in:
parent
62f1fe2c3f
commit
aee82ad342
|
@ -31,6 +31,7 @@ trait Database
|
||||||
$config = new SqlConfig(ResourceFactory::getResourceConfig(
|
$config = new SqlConfig(ResourceFactory::getResourceConfig(
|
||||||
IcingaConfig::app()->get('global', 'config_resource')
|
IcingaConfig::app()->get('global', 'config_resource')
|
||||||
));
|
));
|
||||||
|
$config->charset = 'utf8mb4';
|
||||||
|
|
||||||
$config->options = [PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ];
|
$config->options = [PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ];
|
||||||
if ($config->db === 'mysql') {
|
if ($config->db === 'mysql') {
|
||||||
|
|
Loading…
Reference in New Issue