Fix db table type

This commit is contained in:
Maksim Kachynski 2025-06-15 08:58:26 +03:00
parent 6508819057
commit 3379568880
No known key found for this signature in database
2 changed files with 14 additions and 1 deletions

View file

@ -1,7 +1,7 @@
exports.up = function (knex) { exports.up = function (knex) {
return knex.schema return knex.schema
.alterTable("monitor", function (table) { .alterTable("monitor", function (table) {
table.smallint("manual_status").defaultTo(null); table.string("manual_status").defaultTo(null);
}); });
}; };

View file

@ -0,0 +1,13 @@
// Fix: Change manual_status column type to smallint
exports.up = function (knex) {
return knex.schema
.alterTable("monitor", function (table) {
table.smallint("manual_status").alter();
});
};
exports.down = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.string("manual_status").alter();
});
};