Database: Always use `utf8mb4` as connection charset

This commit is contained in:
Johannes Meyer 2021-07-26 16:37:11 +02:00
parent 62f1fe2c3f
commit aee82ad342
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ trait Database
$config = new SqlConfig(ResourceFactory::getResourceConfig(
IcingaConfig::app()->get('global', 'config_resource')
));
$config->charset = 'utf8mb4';
$config->options = [PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ];
if ($config->db === 'mysql') {