From bd3c8050c91ee302ac805b359e7428bd28a84947 Mon Sep 17 00:00:00 2001 From: Hemanth Date: Fri, 27 Jun 2025 22:27:53 +0530 Subject: [PATCH] added new columns --- db/knex_migrations/2025-06-27-0001-add-rtsp.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/knex_migrations/2025-06-27-0001-add-rtsp.js diff --git a/db/knex_migrations/2025-06-27-0001-add-rtsp.js b/db/knex_migrations/2025-06-27-0001-add-rtsp.js new file mode 100644 index 000000000..ca43423e0 --- /dev/null +++ b/db/knex_migrations/2025-06-27-0001-add-rtsp.js @@ -0,0 +1,18 @@ +// Add new columns and alter 'manual_status' to smallint +// migration file: add_rtsp_fields_to_monitor.js + +exports.up = function (knex) { + return knex.schema.alterTable("monitor", function (table) { + table.string("rtsp_username"); + table.string("rtsp_password"); + table.string("rtsp_path"); + }); +}; + +exports.down = function (knex) { + return knex.schema.alterTable("monitor", function (table) { + table.dropColumn("rtsp_username"); + table.dropColumn("rtsp_password"); + table.dropColumn("rtsp_path"); + }); +};