mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Add db updates for WallClockTimestamps for 1.37.62
This commit is contained in:
@@ -559,6 +559,7 @@ CREATE TABLE `Monitors` (
|
||||
`Encoder` varchar(32),
|
||||
`OutputContainer` enum('auto','mp4','mkv','webm'),
|
||||
`EncoderParameters` TEXT,
|
||||
`WallClockTimestamps` TINYINT NOT NULL DEFAULT '0',
|
||||
`RecordAudio` TINYINT NOT NULL DEFAULT '0',
|
||||
`RecordingSource` enum('Primary','Secondary','Both') NOT NULL DEFAULT 'Primary',
|
||||
`RTSPDescribe` tinyint(1) unsigned,
|
||||
|
||||
20
db/zm_update-1.37.62.sql
Normal file
20
db/zm_update-1.37.62.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
--
|
||||
-- Update Monitors table to have WallClockTimestamps
|
||||
--
|
||||
|
||||
SELECT 'Checking for WallClockTImestamps in Monitors';
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'WallClockTimestamps'
|
||||
) > 0,
|
||||
"SELECT 'Column WallClockTimestamps already exists on Monitors'",
|
||||
"ALTER TABLE Monitors ADD `WallClockTimestamps` TINYINT NOT NULL DEFAULT '0' AFTER `EncoderParameters`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user