add Hostname to Servers

This commit is contained in:
Isaac Connor 2015-09-17 15:39:04 -04:00
parent aac45e54b8
commit 3008974c89
1 changed files with 21 additions and 0 deletions

21
db/zm_update-1.28.107.sql Normal file
View File

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