0
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-22 03:07:50 +01:00
uptime-kuma/db/knex_migrations/2024-04-26-0000-snmp-monitor.js
Matt Visnovsky 7eee5db4d2 Variable changes
-Reuse expected_value for snmpControlValue
-Create jsonPathOperator for snmpCondition
2024-06-05 15:37:47 -06:00

19 lines
677 B
JavaScript

exports.up = function (knex) {
return knex.schema
.alterTable("monitor", function (table) {
table.string("snmp_community_string", 255).defaultTo("public");
table.string("snmp_oid").defaultTo(null);
table.enum("snmp_version", [ "1", "2c", "3" ]).defaultTo("2c");
table.string("json_path_operator").defaultTo(null);
});
};
exports.down = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.dropColumn("snmp_community_string");
table.dropColumn("snmp_oid");
table.dropColumn("snmp_version");
table.dropColumn("json_path_operator");
});
};