From 71c7b324e934c51564f5d3c1fa01faba6c082a1d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 11 Jan 2022 12:01:07 -0500 Subject: [PATCH] Update new Capturing, Analysing, Recording based on Function. --- db/zm_update-1.37.multistream.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/db/zm_update-1.37.multistream.sql b/db/zm_update-1.37.multistream.sql index 5817bcde5..9cf219b06 100644 --- a/db/zm_update-1.37.multistream.sql +++ b/db/zm_update-1.37.multistream.sql @@ -10,6 +10,8 @@ SET @s = (SELECT IF( PREPARE stmt FROM @s; EXECUTE stmt; +UPDATE `Monitors` SET `Capturing` = 'None' WHERE `Function` == 'None'; + SET @s = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() AND table_name = 'Monitors' @@ -22,6 +24,8 @@ SET @s = (SELECT IF( PREPARE stmt FROM @s; EXECUTE stmt; +UPDATE `Monitors` SET `Analysing` = 'None' WHERE `Function` == 'Record' OR `Function` == 'Nodect'; + SET @s = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() AND table_name = 'Monitors' @@ -46,6 +50,9 @@ SET @s = (SELECT IF( PREPARE stmt FROM @s; EXECUTE stmt; +UPDATE `Monitors` SET `Recording` = 'None' WHERE `Function` == 'Monitor'; +UPDATE `Monitors` SET `Recording` = 'OnMotion' WHERE `Function` == 'Modect'; + SET @s = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() AND table_name = 'Monitors'