Add SectionLengthWarn to Monitors table
parent
f06e11a097
commit
7a122f7367
|
@ -568,6 +568,7 @@ CREATE TABLE `Monitors` (
|
|||
`StreamReplayBuffer` int(10) unsigned NOT NULL default '0',
|
||||
`AlarmFrameCount` smallint(5) unsigned NOT NULL default '1',
|
||||
`SectionLength` int(10) unsigned NOT NULL default '600',
|
||||
`SectionLengthWarn` boolean NOT NULL default true,
|
||||
`MinSectionLength` int(10) unsigned NOT NULL default '10',
|
||||
`FrameSkip` smallint(5) unsigned NOT NULL default '0',
|
||||
`MotionFrameSkip` smallint(5) unsigned NOT NULL default '0',
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
--
|
||||
-- Update Monitors table to have SectionLengthWarn
|
||||
--
|
||||
|
||||
SELECT 'Checking for SectionLengthWarn in Monitors';
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'SectionLengthWarn'
|
||||
) > 0,
|
||||
"SELECT 'Column SectionLengthWarn already exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD COLUMN `SectionLengthWarn` boolean NOT NULL default true AFTER `SectionLength`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
Loading…
Reference in New Issue