improve cash-in error handling
This commit is contained in:
parent
86adfd0a63
commit
84a93599f5
9 changed files with 263 additions and 47 deletions
21
migrations/027-tx_errors.js
Normal file
21
migrations/027-tx_errors.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
`create table cash_in_actions (
|
||||
id serial primary key,
|
||||
tx_id uuid references cash_in_txs not null,
|
||||
action text not null,
|
||||
error text,
|
||||
error_code text,
|
||||
tx_hash text,
|
||||
success boolean not null,
|
||||
created timestamptz not null default now()
|
||||
)`
|
||||
]
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue