feat: cashbox history tab
feat: add information fields to cashbox_batches table
This commit is contained in:
parent
642016efeb
commit
21708aa75c
8 changed files with 267 additions and 13 deletions
21
migrations/1617967601902-add-batches-type.js
Normal file
21
migrations/1617967601902-add-batches-type.js
Normal 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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue