From a6f42efe2891bd16afcfb63ad88a35ba97260488 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 30 Aug 2007 12:08:14 +0000 Subject: [PATCH] Moved control protocol updates into correct update script. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2182 e3e1d417-86f3-4887-817a-d78f3d33393f --- db/zm_update-1.22.1.sql | 24 ------------------------ db/zm_update-1.22.3.sql | 13 +++++++++++++ 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/db/zm_update-1.22.1.sql b/db/zm_update-1.22.1.sql index 5021d4387..86429c561 100644 --- a/db/zm_update-1.22.1.sql +++ b/db/zm_update-1.22.1.sql @@ -7,30 +7,6 @@ -- replace into ZonePresets values (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL); --- --- Change control command to protocol module --- -alter table Controls add column Protocol varchar(32) after Command; -update Controls set Protocol = "PelcoD" where Command = "zmcontrol-pelco-d.pl"; -update Controls set Protocol = "PelcoP" where Command = "zmcontrol-pelco-p.pl"; -update Controls set Protocol = "Visca" where Command = "zmcontrol-visca.pl"; -update Controls set Protocol = "PanasonicIP" where Command = "zmcontrol-panasonic-ip.pl"; -update Controls set Protocol = "AxisV2" where Command = "zmcontrol-axis-v2.pl"; -update Controls set Protocol = "Ncs370" where Command = "zmcontrol-ncs370.pl"; -alter table Controls drop column Command; - --- --- Change control command to protocol module --- -alter table Controls add column Protocol varchar(32) after Command; -update Controls set Protocol = "PelcoD" where Command like "%zmcontrol-pelco-d.pl"; -update Controls set Protocol = "PelcoP" where Command like "%zmcontrol-pelco-p.pl"; -update Controls set Protocol = "Visca" where Command like "%zmcontrol-visca.pl"; -update Controls set Protocol = "PanasonicIP" where Command like "%zmcontrol-panasonic-ip.pl"; -update Controls set Protocol = "AxisV2" where Command like "%zmcontrol-axis-v2.pl"; -update Controls set Protocol = "Ncs370" where Command like "%zmcontrol-ncs370.pl"; -alter table Controls drop column Command; - -- -- Remove redundant Zone columns -- diff --git a/db/zm_update-1.22.3.sql b/db/zm_update-1.22.3.sql index 3634c8b7c..bdcea1ad4 100644 --- a/db/zm_update-1.22.3.sql +++ b/db/zm_update-1.22.3.sql @@ -18,6 +18,19 @@ alter table States modify column Definition text; alter table Zones add column OverloadFrames smallint(5) unsigned NOT NULL default '0' after MaxBlobs; alter table ZonePresets add column OverloadFrames smallint(5) unsigned NOT NULL default '0' after MaxBlobs; +-- +-- Change control command to protocol module +-- +alter table Controls add column Protocol varchar(32) after Command; +update Controls set Protocol = "PelcoD" where Command like "%zmcontrol-pelco-d.pl"; +update Controls set Protocol = "PelcoP" where Command like "%zmcontrol-pelco-p.pl"; +update Controls set Protocol = "Visca" where Command like "%zmcontrol-visca.pl"; +update Controls set Protocol = "PanasonicIP" where Command like "%zmcontrol-panasonic-ip.pl"; +update Controls set Protocol = "AxisV2" where Command like "%zmcontrol-axis-v2.pl"; +update Controls set Protocol = "Ncs370" where Command like "%zmcontrol-ncs370.pl"; +update Controls set Protocol = "VclTP" where Command like "%zmcontrol-vcltp.pl"; +alter table Controls drop column Command; + -- -- These are optional, but we might as well do it now --