I just connected to the DB, tried creating my first row from the admin panel.
Expected behavior
It gets saved with no error
Actual behavior
creation failed: invalid input syntax for type timestamp: "Invalid date" This happens even when I put deleted at the date to make sure it is not empty:Failure Logs
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: CURRENT_TIMESTAMP, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:319:25)
at configFromString (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:2536:19)
at configFromInput (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:2978:13)
at prepareConfig (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:2961:13)
at createFromConfig (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:2928:44)
at createLocalOrUTC (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:3022:16)
at createLocal (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:3026:16)
at hooks (/Users/bk/server-admin/node_modules/sequelize/node_modules/moment/moment.js:16:29)
at DATE._applyTimezone (/Users/bk/server-admin/node_modules/sequelize/lib/data-types.js:460:21)
at DATE._stringify (/Users/bk/server-admin/node_modules/sequelize/lib/data-types.js:465:17)
at DATE._stringify (/Users/bk/server-admin/node_modules/sequelize/lib/dialects/postgres/data-types.js:175:20)
at DATE.stringify (/Users/bk/server-admin/node_modules/sequelize/lib/data-types.js:23:19)
at DATE.bindParam (/Users/bk/server-admin/node_modules/sequelize/lib/data-types.js:31:35)
at PostgresQueryGenerator.format (/Users/bk/server-admin/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1011:29)
at PostgresQueryGenerator.insertQuery (/Users/bk/server-admin/node_modules/sequelize/lib/dialects/abstract/query-generator.js:201:30)
at QueryInterface.insert (/Users/bk/server-admin/node_modules/sequelize/lib/query-interface.js:880:37)
at Promise.try.then.then.then (/Users/bk/server-admin/node_modules/sequelize/lib/model.js:3985:52)
at tryCatcher (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:443:21)
[forest] Unexpected error: invalid input syntax for type timestamp: “Invalid date”
SequelizeDatabaseError: invalid input syntax for type timestamp: “Invalid date”
at Query.formatError (/Users/bk/server-admin/node_modules/sequelize/lib/dialects/postgres/query.js:354:16)
at query.catch.err (/Users/bk/server-admin/node_modules/sequelize/lib/dialects/postgres/query.js:71:18)
at tryCatcher (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/bk/server-admin/node_modules/sequelize/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:443:21)
POST /forest/divisionOutlines 500 96 - 141.730 ms
Context
Please provide any relevant information about your setup.
-
Package Version:
-
Express Version:
“chalk”: “~1.1.3”,
“cookie-parser”: “1.4.4”,
“cors”: “2.8.5”,
“debug”: “~4.0.1”,
“dotenv”: “~6.1.0”,
“express”: “~4.16.3”,
“express-jwt”: “5.3.1”,
“forest-express-sequelize”: “^6.0.0”,
“morgan”: “1.9.1”,
“require-all”: “^3.0.0”,
“sequelize”: “~5.15.1”,
“pg”: “~8.2.2” -
Sequelize Version:
-
Database Dialect:
-
Database Version:
-
Project Name: server-admin