add Exif column to sql database

This commit is contained in:
Andrew Bauer 2015-08-16 17:43:45 -05:00
parent 59c1b83d4f
commit 3489d0d734
2 changed files with 18 additions and 0 deletions

View File

@ -377,6 +377,7 @@ CREATE TABLE `Monitors` (
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
`WebColour` varchar(32) NOT NULL default 'red',
`Exif` tinyint(1) unsigned NOT NULL default '0',
`Sequence` smallint(5) unsigned default NULL,
PRIMARY KEY (`Id`)
) ENGINE=@ZM_MYSQL_ENGINE@;

17
db/zm_update-1.28.102.sql Normal file
View File

@ -0,0 +1,17 @@
--
-- Add Monitor Exif 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 = 'Exif'
) > 0,
"SELECT 'Column Options already exists in Monitors'",
"ALTER TABLE `Monitors` ADD `Exif` tinyint(1) unsigned NOT NULL default '0' AFTER `WebColour`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;