Mysql: set default charset to utf8mb4

This commit is contained in:
Alice Gaudon 2020-08-30 10:36:25 +02:00
parent f3818b680f
commit 3b94d9beb5

View File

@ -47,6 +47,7 @@ export default class MysqlConnectionManager {
host: config.get('mysql.host'), host: config.get('mysql.host'),
user: config.get('mysql.user'), user: config.get('mysql.user'),
password: config.get('mysql.password'), password: config.get('mysql.password'),
charset: 'utf8mb4',
}); });
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
connection.query(`CREATE DATABASE IF NOT EXISTS ${dbName}`, (error) => { connection.query(`CREATE DATABASE IF NOT EXISTS ${dbName}`, (error) => {