Change firstSyncCompletion to string, cast to int for JSON

This commit is contained in:
Ben Gotow 2016-07-12 15:23:55 -07:00
parent dfa16fb5fc
commit 7d92438d57

View file

@ -13,7 +13,7 @@ module.exports = (sequelize, Sequelize) => {
syncPolicy: JSONType('syncPolicy'), syncPolicy: JSONType('syncPolicy'),
syncError: JSONType('syncError', {defaultValue: null}), syncError: JSONType('syncError', {defaultValue: null}),
firstSyncCompletion: { firstSyncCompletion: {
type: Sequelize.INTEGER(14), type: Sequelize.STRING(14),
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
}, },
@ -35,7 +35,7 @@ module.exports = (sequelize, Sequelize) => {
connection_settings: this.connectionSettings, connection_settings: this.connectionSettings,
sync_policy: this.syncPolicy, sync_policy: this.syncPolicy,
sync_error: this.syncError, sync_error: this.syncError,
first_sync_completion: this.firstSyncCompletion, first_sync_completion: this.firstSyncCompletion / 1,
last_sync_completions: this.lastSyncCompletions, last_sync_completions: this.lastSyncCompletions,
created_at: this.createdAt, created_at: this.createdAt,
} }