zoneminder/db/zm_update-1.28.101.sql

41 lines
939 B
MySQL
Raw Normal View History

2015-07-23 03:38:35 +08:00
--
2015-07-23 03:49:06 +08:00
-- This updates a 1.28.100 database to 1.28.101
2015-07-23 03:38:35 +08:00
--
--
-- Add AnalysisFPS column to Monitors
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'AnalysisFPS'
) > 0,
"SELECT 'Column AnalysisFPS exists in Monitors'",
"ALTER TABLE Monitors ADD `AnalysisFPS` decimal(5,2) default NULL AFTER `MotionFrameSkip`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;
--
-- Add AnalysisUpdateDelay column to Monitors
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'AnalysisUpdateDelay'
) > 0,
"SELECT 'Column AnalysisUpdateDelay exists in Monitors'",
"ALTER TABLE Monitors ADD `AnalysisUpdateDelay` smallint(5) unsigned not null default 0 AFTER `AnalysisFPS`"
2015-07-24 06:25:57 +08:00
));
PREPARE stmt FROM @s;
EXECUTE stmt;