mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-24 23:09:39 -05:00
Update db migration: allow nulls
DB must allow nulls otherwise this will break other monitors.
This commit is contained in:
parent
99dc4cfb46
commit
138075a2af
@ -2,9 +2,10 @@ exports.up = function (knex) {
|
|||||||
return knex.schema
|
return knex.schema
|
||||||
.alterTable("monitor", function (table) {
|
.alterTable("monitor", function (table) {
|
||||||
table.string("snmp_community_string", 255).defaultTo("public"); // Add snmp_community_string column
|
table.string("snmp_community_string", 255).defaultTo("public"); // Add snmp_community_string column
|
||||||
table.string("snmp_oid").notNullable(); // Add oid column
|
table.string("snmp_oid").defaultTo(null); // Add oid column
|
||||||
table.enum("snmp_version", ["1", "2c", "3"]).defaultTo("2c"); // Add snmp_version column with enum values
|
table.enum("snmp_version", ["1", "2c", "3"]).defaultTo("2c"); // Add snmp_version column with enum values
|
||||||
table.float("snmp_control_value").notNullable(); // Add control_value column as float
|
table.float("snmp_control_value").defaultTo(null); // Add control_value column as float
|
||||||
table.string("snmp_condition").notNullable(); // Add oid column
|
table.string("snmp_condition").defaultTo(null); // Add oid column
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user