feat: cashbox history tab

feat: add information fields to cashbox_batches table
This commit is contained in:
Sérgio Salgado 2021-04-12 01:53:11 +01:00 committed by Josh Harvey
parent 642016efeb
commit 21708aa75c
8 changed files with 267 additions and 13 deletions

View file

@ -0,0 +1,21 @@
var db = require('./db')
exports.up = function (next) {
var sqls = [
`CREATE TYPE cashbox_batch_type AS ENUM(
'cash-in-empty',
'cash-out-1-refill',
'cash-out-1-empty',
'cash-out-2-refill',
'cash-out-2-empty'
)`,
`ALTER TABLE cashbox_batches ADD COLUMN operation_type cashbox_batch_type NOT NULL`,
`ALTER TABLE cashbox_batches ADD COLUMN bill_count_override SMALLINT`,
`ALTER TABLE cashbox_batches ADD COLUMN performed_by VARCHAR(64)`
]
db.multi(sqls, next)
}
exports.down = function (next) {
next()
}