add RTSPDescribe column to Monitors table

This commit is contained in:
Andrew Bauer 2015-08-21 10:32:04 -05:00
parent a2d7ac86fe
commit f5f7363d35
2 changed files with 22 additions and 0 deletions

View File

@ -341,6 +341,7 @@ CREATE TABLE `Monitors` (
`Palette` int(10) unsigned NOT NULL default '0',
`Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0',
`Deinterlacing` int(10) unsigned NOT NULL default '0',
`RTSPDescribe` tinyint(1) unsigned NOT NULL default '0',
`Brightness` mediumint(7) NOT NULL default '-1',
`Contrast` mediumint(7) NOT NULL default '-1',
`Hue` mediumint(7) NOT NULL default '-1',

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

@ -0,0 +1,21 @@
--
-- This updates a 1.28.104 database to 1.28.105
--
--
-- 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 = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'RTSPDescribe'
) > 0,
"SELECT 'Column RTSPDescribe already exists in Monitors'",
"ALTER TABLE `Monitors` ADD `RTSPDescribe` tinyint(1) unsigned NOT NULL default '0' AFTER `Deinterlacing`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;