mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-04-20 23:46:39 -04:00
Added new columns to monitor table for configuring advanced ping behavior:
- ping_count: number of packets to send - ping_deadline: maximum total duration - ping_timeout: time to wait for each response - ping_numeric: output IP addresses instead of hostnames
This commit is contained in:
parent
20820f5a5a
commit
10c81bbfd3
@ -548,6 +548,20 @@ ALTER TABLE monitor
|
||||
table.double("timeout").defaultTo(0).notNullable();
|
||||
});
|
||||
|
||||
/*
|
||||
patch-add-ping-advanced-options.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_deadline INTEGER default 10 not null;
|
||||
ALTER TABLE monitor ADD ping_timeout INTEGER default 2 not null;
|
||||
*/
|
||||
await knex.schema.table("monitor", function (table) {
|
||||
table.integer("ping_count").defaultTo(1).notNullable();
|
||||
table.boolean("ping_numeric").defaultTo(true).notNullable();
|
||||
table.integer("ping_deadline").defaultTo(10).notNullable();
|
||||
table.integer("ping_timeout").defaultTo(2).notNullable();
|
||||
});
|
||||
|
||||
/*
|
||||
patch-add-gamedig-given-port.sql
|
||||
ALTER TABLE monitor
|
||||
|
7
db/old_migrations/patch-add-ping-advanced-options.sql
Normal file
7
db/old_migrations/patch-add-ping-advanced-options.sql
Normal file
@ -0,0 +1,7 @@
|
||||
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
|
||||
BEGIN TRANSACTION;
|
||||
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_deadline INTEGER default 10 not null;
|
||||
ALTER TABLE monitor ADD ping_timeout INTEGER default 2 not null;
|
||||
COMMIT;
|
Loading…
x
Reference in New Issue
Block a user