Add db updates for WallClockTimestamps for 1.37.62

This commit is contained in:
Isaac Connor
2024-07-07 09:03:31 -04:00
parent ca770b9cd7
commit 7d685e96df
2 changed files with 21 additions and 0 deletions

View File

@@ -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
View 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;