Log unsuccessful trade attempts in the db (#224)

* Save trade error in table trades

* Add one migration, Add error column to trades table

* changes in plugins.js file

* Apply standardjs to plugins.js file
This commit is contained in:
Davit Abulashvili 2018-11-28 22:24:48 +04:00 committed by Josh Harvey
parent 13040f41a1
commit 907cd08cf1
3 changed files with 103 additions and 41 deletions

View file

@ -0,0 +1,15 @@
var db = require('./db')
exports.up = function (next) {
const sql = [
'alter table trades add column error text',
]
db.multi(sql, next)
}
exports.down = function (next) {
const sql = ['alter table trades drop column error']
db.multi(sql, next)
}