feat: created migration to add a schema_version column on the user_config table

feat: adapted the new settings loader to work with the db instead of
the json file

fix: fixed the schema migration file

fix: updated accounts to work with the db

fix: fetch only data with the new schema version

fix: change the account saving process so there's no more than one
account record

chore: removed unnecessary TODO comments

fix: replaced an error throwing with a Promise reject

fix: when looking for the latest config, don't limit it to the new ones

fix: fix function names on gql server

fix: remove duplicate import

fix: return an empty object when there's no schema_version 2 config yet
This commit is contained in:
Liordino Neto 2020-07-20 22:41:45 -03:00 committed by Josh Harvey
parent 29502ee303
commit 6e356217ae
3 changed files with 107 additions and 54 deletions

View file

@ -0,0 +1,13 @@
const db = require('./db')
module.exports.up = function (next) {
var sql = [
'alter table user_config add column schema_version smallint DEFAULT 1'
]
db.multi(sql, next)
}
module.exports.down = function (next) {
next()
}