2024-04-27 01:05:56 +00:00
|
|
|
exports.up = function (knex) {
|
|
|
|
return knex.schema
|
|
|
|
.alterTable("monitor", function (table) {
|
2024-05-08 16:06:20 +00:00
|
|
|
table.string("snmp_community_string", 255).defaultTo("public");
|
|
|
|
table.string("snmp_oid").defaultTo(null);
|
|
|
|
table.enum("snmp_version", [ "1", "2c", "3" ]).defaultTo("2c");
|
|
|
|
table.float("snmp_control_value").defaultTo(null);
|
|
|
|
table.string("snmp_condition").defaultTo(null);
|
2024-04-27 01:05:56 +00:00
|
|
|
});
|
2024-04-30 21:10:43 +00:00
|
|
|
};
|
2024-04-30 21:11:21 +00:00
|
|
|
|
|
|
|
exports.down = function (knex) {
|
2024-05-01 00:06:03 +00:00
|
|
|
return knex.schema.alterTable("monitor", function (table) {
|
|
|
|
table.dropColumn("snmp_community_string");
|
|
|
|
table.dropColumn("snmp_oid");
|
|
|
|
table.dropColumn("snmp_version");
|
|
|
|
table.dropColumn("snmp_control_value");
|
|
|
|
table.dropColumn("snmp_condition");
|
|
|
|
});
|
2024-05-01 00:04:59 +00:00
|
|
|
};
|