Remove charset and multipleStatements from config file, added hardcoded

This commit is contained in:
joker-x 2020-08-26 10:20:26 +02:00
parent 1b4afbca81
commit f610f93fa7
4 changed files with 9 additions and 6 deletions

View file

@ -124,11 +124,9 @@ mysql:
# Some installations, eg. MAMP can use a different port (8889)
# MAMP users should also turn on Allow network access to MySQL otherwise MySQL might not be accessible
port: 3306
charset: utf8mb4
# The timezone configured on the MySQL server. This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM
# If the MySQL server runs on the same server as Mailtrain, use 'local'
timezone: local
multipleStatements: true
verp:
# Enable to start an MX server that detects bounced messages using VERP

View file

@ -10,7 +10,10 @@ const knex = require('knex')({
connection: {
...config.mysql,
// DATE and DATETIME types contain no timezone info. The MySQL driver tries to interpret them w.r.t. to local time, which
charset: utf8mb4,
multipleStatements: true,
// DATE and DATETIME types contain no timezone info. The MySQL driver tries to interpret them w.r.t. to local time, which
// does not work well with assigning these values in UTC and handling them as if in UTC
dateStrings: [
'DATE',

View file

@ -1,6 +1,10 @@
'use strict';
const config = require('./config');
let config = require('./config');
config.mysql.charset="utf8mb4";
config.mysql.multipleStatements=true;
module.exports = {
client: 'mysql',

View file

@ -233,8 +233,6 @@ www:
mysql:
password: "$mysqlPassword"
charset: utf8mb4
multipleStatements: true
redis:
enabled: true