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'),
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,
}