fix: replace serial with uuid and remove incorrect promise handling
This commit is contained in:
parent
d9ffca8a35
commit
af53949ef9
2 changed files with 1 additions and 3 deletions
|
|
@ -13,8 +13,6 @@ function createCashboxBatch (rec) {
|
||||||
const newBatch = await t.oneOrNone(sql, [rec.deviceId])
|
const newBatch = await t.oneOrNone(sql, [rec.deviceId])
|
||||||
return t.oneOrNone(sql2, [newBatch.id, newBatch.device_id])
|
return t.oneOrNone(sql2, [newBatch.id, newBatch.device_id])
|
||||||
})
|
})
|
||||||
.then(data => data)
|
|
||||||
.catch(error => error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { createCashboxBatch }
|
module.exports = { createCashboxBatch }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ var db = require('./db')
|
||||||
exports.up = function (next) {
|
exports.up = function (next) {
|
||||||
var sqls = [
|
var sqls = [
|
||||||
`create table cashbox_batches (
|
`create table cashbox_batches (
|
||||||
id serial PRIMARY KEY,
|
id uuid PRIMARY KEY,
|
||||||
device_id text REFERENCES devices (device_id),
|
device_id text REFERENCES devices (device_id),
|
||||||
created timestamptz NOT NULL default now()
|
created timestamptz NOT NULL default now()
|
||||||
)`,
|
)`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue