2023-10-26 22:40:44 -06:00
|
|
|
exports.up = function (knex) {
|
|
|
|
// add various slow_response_notification parameters
|
|
|
|
return knex.schema
|
|
|
|
.alterTable("monitor", function(table) {
|
2023-10-31 23:17:35 -06:00
|
|
|
table.boolean("slow_response_notification").notNullable().defaultTo(false);
|
|
|
|
table.string("slow_response_notification_method").notNullable().defaultTo("");
|
2023-11-08 14:50:03 -07:00
|
|
|
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);
|
2023-10-31 23:17:35 -06:00
|
|
|
table.integer("slow_response_notification_resend_interval").notNullable().defaultTo(0);
|
|
|
|
})
|
|
|
|
.alterTable("heartbeat", function(table) {
|
|
|
|
table.integer("slow_response_count").notNullable().defaultTo(0);
|
2023-10-26 22:40:44 -06:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.down = function (knex) {
|
2023-11-08 14:50:03 -07:00
|
|
|
// remove various slow_response_notification parameters
|
2023-10-26 22:40:44 -06:00
|
|
|
return knex.schema
|
|
|
|
.alterTable("monitor", function(table) {
|
2023-11-08 14:50:03 -07:00
|
|
|
table.dropColumn("slow_response_notification");
|
|
|
|
table.dropColumn("slow_response_notification_method");
|
|
|
|
table.dropColumn("slow_response_notification_range");
|
|
|
|
table.dropColumn("slow_response_notification_threshold_method");
|
|
|
|
table.dropColumn("slow_response_notification_threshold");
|
|
|
|
table.dropColumn("slow_response_notification_threshold_multiplier");
|
|
|
|
table.dropColumn("slow_response_notification_resend_interval");
|
2023-10-31 23:17:35 -06:00
|
|
|
})
|
|
|
|
.alterTable("heartbeat", function(table) {
|
2023-11-08 14:50:03 -07:00
|
|
|
table.dropColumn("slow_response_count");
|
2023-10-26 22:40:44 -06:00
|
|
|
});
|
|
|
|
}
|