add a check for StateId
This commit is contained in:
parent
ba1100fc03
commit
b25958df14
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue