Remove STRICT_TRANS_TABLES from sql_mode. Fix #936 #748

This commit is contained in:
joker-x 2020-08-24 07:41:19 +02:00
parent aed115a64b
commit 12e8e39023

View file

@ -17,6 +17,15 @@ const knex = require('knex')({
'DATETIME'
]
},
pool: {
min: 2,
max: 10,
afterCreate: function(conn, cb) {
conn.query('SET sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";', function (err) {
cb(err, conn);
});
}
},
migrations: {
directory: path.join(__dirname, '..', 'setup', 'knex', 'migrations')
}