Rename ONVIF_Alarm_Txt to ONVIF_Alarm_Text

pull/3540/head
Isaac Connor 2022-07-23 16:07:45 -04:00
parent d2d5b6e489
commit a3395df49f
1 changed files with 18 additions and 0 deletions

18
db/zm_update-1.37.19.sql Normal file
View File

@ -0,0 +1,18 @@
--
-- Update Monitors table to have ONVIF_Alarm_Text
--
SELECT 'Checking for ONVIF_Alarm_Text in Monitors';
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'ONVIF_Alarm_Text'
) > 0,
"SELECT 'Column ONVIF_Alarm_Text already exists in Monitors'",
"ALTER TABLE zm.Monitors ADD Onvif_Alarm_Text varchar(30) DEFAULT 'MotionAlarm' AFTER `ONVIF_Event_Listener`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;