From a7407a1b658065daa12a3d86ebf2f02a2e25a38a Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 5 Nov 2024 13:35:42 +0100 Subject: [PATCH] fix not setting a default for json monitor operations (#5295) --- db/knex_migrations/2024-10-31-0000-fix-snmp-monitor.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/knex_migrations/2024-10-31-0000-fix-snmp-monitor.js diff --git a/db/knex_migrations/2024-10-31-0000-fix-snmp-monitor.js b/db/knex_migrations/2024-10-31-0000-fix-snmp-monitor.js new file mode 100644 index 000000000..0a605d38f --- /dev/null +++ b/db/knex_migrations/2024-10-31-0000-fix-snmp-monitor.js @@ -0,0 +1,7 @@ +exports.up = function (knex) { + return knex("monitor").whereNull("json_path_operator").update("json_path_operator", "=="); +}; +exports.down = function (knex) { + // changing the json_path_operator back to null for all "==" is not possible anymore + // we have lost the context which fields have been set explicitely in >= v2.0 and which would need to be reverted +};