Rename ONVIF_Alarm_Txt to ONVIF_Alarm_Text
parent
d2d5b6e489
commit
a3395df49f
|
@ -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;
|
Loading…
Reference in New Issue