Merge pull request #403 from resin-io/402-ensure-no-null-app-configs

Issue #402: Ensure that app configs are non-null and valid json objects
This commit is contained in:
Pablo Carranza Vélez 2017-03-28 19:22:04 -03:00 committed by GitHub
commit 68ac688609

View File

@ -52,6 +52,9 @@ knex.init = Promise.all([
addColumn('app', 'appId', 'string')
addColumn('app', 'config', 'json')
]
.then ->
# When updating from older supervisors, config can be null
knex('app').update({ config: '{}' }).whereNull('config')
knex.schema.hasTable('image')
.then (exists) ->