Change format date from ISO-8601 to "YYYY-MM-DD HH:mm:ss" for save in database without ER_TRUNCATED_WRONG_VALUE error

This commit is contained in:
joker-x 2020-09-09 17:31:16 +02:00
parent 2f427a67dd
commit 02d2b215f2
2 changed files with 3 additions and 7 deletions

View file

@ -19,11 +19,7 @@ const knex = require('knex')({
},
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);
});
max: 10
}
},
migrations: {