lamassu-server/migrations/1536651947391-add-device-id-to-cash-out-actions.js
Rafael Taranto 38aa006ecc Add device_id to cash_out_actions table (#164)
If a costumer originates a cashOut transaction at one device, and then
redeemed at a different device, the wrong machine would have bills debited from it.

With device_id being saved at the cash_out_actions table the bills can
be properly reconciled.
2018-09-22 23:38:31 +01:00

12 lines
218 B
JavaScript

var db = require('./db')
exports.up = function (next) {
var sql = [
"alter table cash_out_actions add device_id text not null default ''"
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}