From 3008974c89fe3d7e37e779360ada030f2a8e6e7f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 17 Sep 2015 15:39:04 -0400 Subject: [PATCH] add Hostname to Servers --- db/zm_update-1.28.107.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 db/zm_update-1.28.107.sql 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;