diff --git a/server/lib/knex.js b/server/lib/knex.js index 43cc7194..7240d312 100644 --- a/server/lib/knex.js +++ b/server/lib/knex.js @@ -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') }