Add Janus_RTSP_USer to Monitors

add_janus_rtsp_user
Isaac Connor 2022-09-09 21:59:14 -04:00
parent d9c0e1dd8f
commit f5ad68143c
2 changed files with 19 additions and 0 deletions

View File

@ -467,6 +467,7 @@ CREATE TABLE `Monitors` (
`JanusAudioEnabled` BOOLEAN NOT NULL default false,
`Janus_Profile_Override` VARCHAR(30) NOT NULL DEFAULT '',
`Janus_Use_RTSP_Restream` BOOLEAN NOT NULL default false,
`Janus_RTSP_User` INT(10),
`LinkedMonitors` varchar(255),
`Triggers` set('X10') NOT NULL default '',
`EventStartCommand` VARCHAR(255) NOT NULL DEFAULT '',

18
db/zm_update-1.37.22.sql Normal file
View File

@ -0,0 +1,18 @@
--
-- Update Monitors table to have a MQTT_Enabled Column
--
SELECT 'Checking for `Janus_RTSP_User` in Monitors';
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'Janus_RTSP_User'
) > 0,
"SELECT 'Column Janus_RTSP_User already exists in Monitors'",
"ALTER TABLE Monitors ADD COLUMN `Janus_RTSP_User` INT(10) AFTER `Janus_Use_RTSP_Restream`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;