fix: allow for custom info requests to be allowed or blocked

fix: improve custom info requests backend
fix: add custom info requests to trigger overrides
This commit is contained in:
Sérgio Salgado 2022-01-18 18:46:55 +00:00
parent 08bcf03a1e
commit 87a3b718db
11 changed files with 167 additions and 88 deletions

View file

@ -0,0 +1,16 @@
var db = require('./db')
exports.up = function (next) {
var sql = [
`ALTER TABLE customers_custom_info_requests DROP COLUMN approved`,
`ALTER TABLE customers_custom_info_requests ADD COLUMN override verification_type NOT NULL DEFAULT 'automatic'`,
`ALTER TABLE customers_custom_info_requests ADD COLUMN override_by UUID REFERENCES users(id)`,
`ALTER TABLE customers_custom_info_requests ADD COLUMN override_at TIMESTAMPTZ`
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}