From 7d92438d57704a22f7f86808a321499cfdfeec43 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 12 Jul 2016 15:23:55 -0700 Subject: [PATCH] Change firstSyncCompletion to string, cast to int for JSON --- packages/nylas-core/models/shared/account.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nylas-core/models/shared/account.js b/packages/nylas-core/models/shared/account.js index da16219d3..df5d537d2 100644 --- a/packages/nylas-core/models/shared/account.js +++ b/packages/nylas-core/models/shared/account.js @@ -13,7 +13,7 @@ module.exports = (sequelize, Sequelize) => { syncPolicy: JSONType('syncPolicy'), syncError: JSONType('syncError', {defaultValue: null}), firstSyncCompletion: { - type: Sequelize.INTEGER(14), + type: Sequelize.STRING(14), allowNull: true, defaultValue: null, }, @@ -35,7 +35,7 @@ module.exports = (sequelize, Sequelize) => { connection_settings: this.connectionSettings, sync_policy: this.syncPolicy, sync_error: this.syncError, - first_sync_completion: this.firstSyncCompletion, + first_sync_completion: this.firstSyncCompletion / 1, last_sync_completions: this.lastSyncCompletions, created_at: this.createdAt, }