Fix snowflakes being rounded when querying the database

This commit is contained in:
Dragory 2018-08-02 00:58:21 +03:00
parent d55bf80158
commit b5b71bcf04

View file

@ -12,6 +12,9 @@ module.exports = {
database: process.env.DB_DATABASE,
charset: 'utf8mb4',
timezone: 'UTC',
supportBigNumbers: true,
bigNumberStrings: true,
dateStrings: true,
typeCast(field, next) {
if (field.type === 'DATETIME') {
return moment(field.string()).format('YYYY-MM-DD HH:mm:ss');