Skip to content

Commit

Permalink
Merge branch 'wallclock_timestamps'
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jul 7, 2024
2 parents 007b8be + 7d685e9 commit e508d7d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions db/zm_create.sql.in
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 20 additions & 0 deletions db/zm_update-1.37.62.sql
Original file line number Diff line number Diff line change
@@ -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;


0 comments on commit e508d7d

Please sign in to comment.