From 15f84024ac516000f44c7e72158acd2aea3f111d Mon Sep 17 00:00:00 2001 From: kno Date: Fri, 14 Oct 2016 11:29:03 +0200 Subject: [PATCH] Prevent createdA being updated on upsert (updateOrCreate) call #11 --- es6/time-stamp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es6/time-stamp.js b/es6/time-stamp.js index 28f8ebe..70558c5 100644 --- a/es6/time-stamp.js +++ b/es6/time-stamp.js @@ -33,7 +33,7 @@ export default (Model, bootOptions = {}) => { Model.defineProperty(options.createdAt, { type: Date, required: options.required, - defaultFn: 'now', + default: new Date(), }); Model.defineProperty(options.updatedAt, {