chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
18
packages/server/migrations/1691523881128-bills-using-text.js
Normal file
18
packages/server/migrations/1691523881128-bills-using-text.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
const db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
'ALTER TABLE empty_unit_bills ALTER COLUMN device_id TYPE TEXT, ALTER COLUMN device_id SET NOT NULL',
|
||||
'ALTER TABLE empty_unit_bills DROP CONSTRAINT empty_unit_bills_device_id_fkey',
|
||||
'ALTER TABLE devices DROP COLUMN cashbox',
|
||||
'CREATE INDEX ON empty_unit_bills (cashbox_batch_id)',
|
||||
'CREATE INDEX ON bills (cashbox_batch_id)',
|
||||
'CREATE INDEX ON bills (destination_unit)',
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue