fix: fkeys on device_id

This commit is contained in:
Rafael Taranto 2024-08-21 13:24:37 +01:00
parent 741eac9484
commit 2b2738c204
3 changed files with 15 additions and 1 deletions

View file

@ -32,7 +32,8 @@ function unpair (deviceId) {
const q2 = t.none(`DELETE FROM machine_pings WHERE device_id=$1`, [deviceId])
const q3 = t.none(`DELETE FROM machine_network_heartbeat WHERE device_id=$1`, [deviceId])
const q4 = t.none(`DELETE FROM machine_network_performance WHERE device_id=$1`, [deviceId])
return t.batch([q1, q2, q3, q4])
const q5 = t.none(`DELETE FROM machine_diagnostics WHERE device_id=$1`, [deviceId])
return t.batch([q1, q2, q3, q4, q5])
})
)
}