Update new Capturing, Analysing, Recording based on Function.

This commit is contained in:
Isaac Connor 2022-01-11 12:01:07 -05:00
parent 1f9d3c46aa
commit 71c7b324e9
1 changed files with 7 additions and 0 deletions

View File

@ -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'