chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
|
|
@ -0,0 +1,26 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sqls = [
|
||||
`create table cashbox_batches (
|
||||
id uuid PRIMARY KEY,
|
||||
device_id text REFERENCES devices (device_id),
|
||||
created timestamptz NOT NULL default now()
|
||||
)`,
|
||||
|
||||
`ALTER TABLE bills ADD COLUMN legacy boolean DEFAULT false`,
|
||||
|
||||
`ALTER TABLE bills ADD COLUMN cashbox_batch_id uuid`,
|
||||
|
||||
`ALTER TABLE bills ADD CONSTRAINT cashbox_batch_id
|
||||
FOREIGN KEY (cashbox_batch_id)
|
||||
REFERENCES cashbox_batches (id)`,
|
||||
|
||||
`UPDATE bills SET legacy = 'true'`
|
||||
]
|
||||
db.multi(sqls, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue