mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Add SectionLengthWarn to Monitors table
This commit is contained in:
@@ -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',
|
||||
|
||||
18
db/zm_update-1.37.29.sql
Normal file
18
db/zm_update-1.37.29.sql
Normal file
@@ -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;
|
||||
Reference in New Issue
Block a user