From 7aacc3caceac0420d4f7feda9f6bc880d2f5c348 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Tue, 27 Aug 2024 15:17:57 +0100 Subject: [PATCH] fix: machine_diagnostics doesn't exist --- lib/pairing.js | 1 - migrations/1724242113482-drop-last-used-fkey.js | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) 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) {