mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 09:13:21 +00:00
Simplified and secured Local Service monitor
This commit is contained in:
@@ -4,9 +4,7 @@
|
||||
*/
|
||||
exports.up = async (knex) => {
|
||||
await knex.schema.alterTable("monitor", (table) => {
|
||||
table.string("local_service_command");
|
||||
table.string("local_service_expected_output");
|
||||
table.string("local_service_check_type").notNullable().defaultTo("keyword");
|
||||
table.string("local_service_name");
|
||||
});
|
||||
};
|
||||
|
||||
@@ -15,19 +13,7 @@ exports.up = async (knex) => {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
exports.down = async (knex) => {
|
||||
if (await knex.schema.hasColumn("monitor", "local_service_command")) {
|
||||
await knex.schema.alterTable("monitor", (table) => {
|
||||
table.dropColumn("local_service_command");
|
||||
});
|
||||
}
|
||||
if (await knex.schema.hasColumn("monitor", "local_service_expected_output")) {
|
||||
await knex.schema.alterTable("monitor", (table) => {
|
||||
table.dropColumn("local_service_expected_output");
|
||||
});
|
||||
}
|
||||
if (await knex.schema.hasColumn("monitor", "local_service_check_type")) {
|
||||
await knex.schema.alterTable("monitor", (table) => {
|
||||
table.dropColumn("local_service_check_type");
|
||||
});
|
||||
}
|
||||
await knex.schema.alterTable("monitor", (table) => {
|
||||
table.dropColumn("local_service_name");
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user