fix: migrations failing because of machine query

This commit is contained in:
Rafael Taranto 2023-08-30 21:24:55 +01:00
parent f1e6e24f05
commit 2d8ff49769
2 changed files with 15 additions and 9 deletions

View file

@ -62,6 +62,11 @@ function toMachineObject (r) {
}
}
function getMachineIds () {
const sql = 'select device_id from devices'
return db.any(sql)
}
function getMachines () {
const sql = `${MACHINE_WITH_CALCULATED_FIELD_SQL} where display=TRUE ORDER BY created`
return db.any(sql)
@ -439,6 +444,7 @@ module.exports = {
getNetworkPerformance,
getNetworkHeartbeat,
getConfig,
getMachineIds,
emptyMachineUnits,
refillMachineUnits
}