Skip to content

Commit

Permalink
fix: machine_diagnostics doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelTaranto committed Aug 27, 2024
1 parent cdc70ba commit 7aacc3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion lib/pairing.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ 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])
const q5 = t.none(`DELETE FROM machine_diagnostics WHERE device_id=$1`, [deviceId])
return t.batch([q1, q2, q3, q4, q5])
})
)
Expand Down
5 changes: 1 addition & 4 deletions migrations/1724242113482-drop-last-used-fkey.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const db = require('./db')

exports.up = function (next) {
db.multi([
'ALTER TABLE customers DROP CONSTRAINT customers_last_used_machine_fkey;',
'ALTER TABLE machine_diagnostics DROP CONSTRAINT machine_diagnostics_device_id_fkey;'
], next)
db.multi(['ALTER TABLE customers DROP CONSTRAINT customers_last_used_machine_fkey;'], next)
}

exports.down = function (next) {
Expand Down

0 comments on commit 7aacc3c

Please sign in to comment.