From d3709802c57b84869f593f3b9e3da3fd8e4ae38e Mon Sep 17 00:00:00 2001 From: Stephen Papierski Date: Wed, 8 Nov 2023 16:31:06 -0700 Subject: [PATCH] Add db defaults so existing entries don't show up empty --- ...ion.js => 2023-11-08-slow-response-notification.js} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename db/knex_migrations/{2023-10-26-slow-response-notification.js => 2023-11-08-slow-response-notification.js} (89%) diff --git a/db/knex_migrations/2023-10-26-slow-response-notification.js b/db/knex_migrations/2023-11-08-slow-response-notification.js similarity index 89% rename from db/knex_migrations/2023-10-26-slow-response-notification.js rename to db/knex_migrations/2023-11-08-slow-response-notification.js index 8a2c19089..b3088fed1 100644 --- a/db/knex_migrations/2023-10-26-slow-response-notification.js +++ b/db/knex_migrations/2023-11-08-slow-response-notification.js @@ -3,11 +3,11 @@ exports.up = function (knex) { return knex.schema .alterTable("monitor", function(table) { table.boolean("slow_response_notification").notNullable().defaultTo(false); - table.string("slow_response_notification_method").notNullable().defaultTo(""); - table.integer("slow_response_notification_range").notNullable().defaultTo(0); - table.string("slow_response_notification_threshold_method").notNullable().defaultTo(""); - table.integer("slow_response_notification_threshold").notNullable().defaultTo(0); - table.float("slow_response_notification_threshold_multiplier").notNullable().defaultTo(0.0); + table.string("slow_response_notification_method").notNullable().defaultTo("average"); + table.integer("slow_response_notification_range").notNullable().defaultTo(300); + table.string("slow_response_notification_threshold_method").notNullable().defaultTo("threshold-relative-24-hour"); + table.integer("slow_response_notification_threshold").notNullable().defaultTo(2500); + table.float("slow_response_notification_threshold_multiplier").notNullable().defaultTo(5.0); table.integer("slow_response_notification_resend_interval").notNullable().defaultTo(0); }) .alterTable("heartbeat", function(table) {