fix: JSON fields handling for MariaDB

This commit is contained in:
Nick
2019-02-09 19:10:34 -05:00
parent a8c7710412
commit b1dd54768f
35 changed files with 447 additions and 35 deletions

View File

@@ -24,12 +24,15 @@ module.exports = class Storage extends Model {
properties: {
key: {type: 'string'},
isEnabled: {type: 'boolean'},
mode: {type: 'string'},
config: {type: 'object'}
mode: {type: 'string'}
}
}
}
static get jsonAttributes() {
return ['config']
}
static async getTargets() {
return WIKI.models.storage.query()
}