diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 6c376be7f..081f71181 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -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', diff --git a/db/zm_update-1.28.105.sql b/db/zm_update-1.28.105.sql new file mode 100644 index 000000000..0262658e5 --- /dev/null +++ b/db/zm_update-1.28.105.sql @@ -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;