mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 18:40:57 +08:00
Enhanced ping monitor with advanced options (count, timeout, numeric) (#5588)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
24
db/knex_migrations/2025-03-04-0000-ping-advanced-options.js
Normal file
24
db/knex_migrations/2025-03-04-0000-ping-advanced-options.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/* SQL:
|
||||
ALTER TABLE monitor ADD ping_count INTEGER default 1 not null;
|
||||
ALTER TABLE monitor ADD ping_numeric BOOLEAN default true not null;
|
||||
ALTER TABLE monitor ADD ping_per_request_timeout INTEGER default 2 not null;
|
||||
*/
|
||||
exports.up = function (knex) {
|
||||
// Add new columns to table monitor
|
||||
return knex.schema
|
||||
.alterTable("monitor", function (table) {
|
||||
table.integer("ping_count").defaultTo(1).notNullable();
|
||||
table.boolean("ping_numeric").defaultTo(true).notNullable();
|
||||
table.integer("ping_per_request_timeout").defaultTo(2).notNullable();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
return knex.schema
|
||||
.alterTable("monitor", function (table) {
|
||||
table.dropColumn("ping_count");
|
||||
table.dropColumn("ping_numeric");
|
||||
table.dropColumn("ping_per_request_timeout");
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user