Add db defaults so existing entries don't show up empty

This commit is contained in:
Stephen Papierski 2023-11-08 16:31:06 -07:00
parent 77dc2dd154
commit d3709802c5
No known key found for this signature in database

View file

@ -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) {