diff --git a/lib/pairing.js b/lib/pairing.js index ebedc0015..04a1d818c 100644 --- a/lib/pairing.js +++ b/lib/pairing.js @@ -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]) }) ) diff --git a/migrations/1724242113482-drop-last-used-fkey.js b/migrations/1724242113482-drop-last-used-fkey.js index 3c3b62d78..9459ac518 100644 --- a/migrations/1724242113482-drop-last-used-fkey.js +++ b/migrations/1724242113482-drop-last-used-fkey.js @@ -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) {