add a check for StateId

This commit is contained in:
Isaac Connor 2015-09-17 16:07:04 -04:00
parent ba1100fc03
commit b25958df14
1 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,23 @@
-- This updates a 1.28.105 database to 1.28.106 -- This updates a 1.28.105 database to 1.28.106
-- --
--
-- Add Monitor StateId field
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Servers'
AND table_schema = DATABASE()
AND column_name = 'StateId'
) > 0,
"SELECT 'Column StateId already exists in Servers'",
"ALTER TABLE `Servers` ADD `StateId` int(10) unsigned AFTER `Name`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;
-- --
-- Add Monitor RTSPDescribe field -- Add Monitor RTSPDescribe field
-- Used to enable or disable processing of the remote camera RTSP DESCRIBE response header -- Used to enable or disable processing of the remote camera RTSP DESCRIBE response header