v12.0.0 - initial commit
This commit is contained in:
commit
e2c49ea43c
1145 changed files with 97211 additions and 0 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.runAll(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue