After adding SaveJPEGs to Events, need to populate them with SaveJPegs from MOnitors

This commit is contained in:
Isaac Connor 2020-09-24 13:43:05 -04:00
parent 2457dcb16f
commit 32e0c92747
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,8 @@ SET @s = (SELECT IF(
PREPARE stmt FROM @s; PREPARE stmt FROM @s;
EXECUTE stmt; EXECUTE stmt;
UPDATE `Events` SET `SaveJPEGs`=(SELECT `SaveJPEGs` FROM `Monitors` WHERE Monitors.Id = MonitorId) WHERE `SaveJPEGs` IS NULL;
SET @s = (SELECT IF( SET @s = (SELECT IF(
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
AND table_name = 'Storage' AND table_name = 'Storage'