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:
parent
13040f41a1
commit
907cd08cf1
3 changed files with 103 additions and 41 deletions
15
migrations/1542811343367-add-error-to-trades.js
Normal file
15
migrations/1542811343367-add-error-to-trades.js
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue