diff --git a/db/zm_update-1.28.107.sql b/db/zm_update-1.28.107.sql new file mode 100644 index 000000000..a5f75c9d8 --- /dev/null +++ b/db/zm_update-1.28.107.sql @@ -0,0 +1,21 @@ +-- +-- This updates a 1.28.105 database to 1.28.106 +-- + +-- +-- Add Monitor RTSPDescribe field +-- Used to enable or disable processing of the remote camera RTSP DESCRIBE response header +-- +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Servers' + AND table_schema = DATABASE() + AND column_name = 'Hostname' + ) > 0, +"SELECT 'Column Hostname already exists in Servers'", +"ALTER TABLE `Servers` ADD `Hostname` TEXT NOT NULL default '' AFTER `StateId`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt;