2024-04-27 03:05:56 +02:00
|
|
|
exports.up = function (knex) {
|
|
|
|
return knex.schema
|
|
|
|
.alterTable("monitor", function (table) {
|
2024-04-29 23:59:21 +02:00
|
|
|
table.string("snmp_community_string", 255).defaultTo("public"); // Add snmp_community_string column
|
2024-04-30 23:10:43 +02:00
|
|
|
table.string("snmp_oid").defaultTo(null); // Add oid column
|
2024-05-01 02:04:59 +02:00
|
|
|
table.enum("snmp_version", [ "1", "2c", "3" ]).defaultTo("2c"); // Add snmp_version column with enum values
|
2024-04-30 23:10:43 +02:00
|
|
|
table.float("snmp_control_value").defaultTo(null); // Add control_value column as float
|
|
|
|
table.string("snmp_condition").defaultTo(null); // Add oid column
|
2024-04-27 03:05:56 +02:00
|
|
|
});
|
2024-04-30 23:10:43 +02:00
|
|
|
};
|
2024-04-30 23:11:21 +02:00
|
|
|
|
|
|
|
exports.down = function (knex) {
|
|
|
|
// Nothing to do here
|
2024-05-01 02:04:59 +02:00
|
|
|
};
|