add Encoder to Monitors

This commit is contained in:
Isaac Connor 2018-02-28 07:17:52 -08:00
parent c443168389
commit a19e6b619c
1 changed files with 14 additions and 0 deletions

14
db/zm_update-1.31.40.sql Normal file
View File

@ -0,0 +1,14 @@
ALTER TABLE `Monitors` MODIFY `OutputCodec` int(10) UNSIGNED NOT NULL default 0;
SET @s = (SELECT IF(
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
AND table_name = 'Monitors'
AND column_name = 'Encoder'
) > 0,
"SELECT 'Column Encoder already exists in Monitors'",
"ALTER TABLE `Monitors` ADD `Encoder` enum('auto','h264','h264_omx','mjpeg','mpeg1','mpeg2') AFTER `OutputCodec`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;