Moved control protocol updates into correct update script.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2182 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2007-08-30 12:08:14 +00:00
parent e6392ba2ce
commit a6f42efe28
2 changed files with 13 additions and 24 deletions

View File

@ -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
--

View File

@ -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
--