2007-04-03 17:59:59 +08:00
|
|
|
--
|
2007-09-18 22:15:29 +08:00
|
|
|
-- This updates a 1.22.3 database to 1.23.0
|
2007-04-03 17:59:59 +08:00
|
|
|
--
|
|
|
|
|
2007-08-30 02:11:09 +08:00
|
|
|
--
|
|
|
|
-- Add a column for buffer replay streams
|
|
|
|
--
|
|
|
|
alter table Monitors add column `StreamReplayBuffer` int(10) unsigned NOT NULL default '1000' after PostEventCount;
|
|
|
|
|
2007-09-06 00:31:42 +08:00
|
|
|
--
|
|
|
|
-- Change the default timestamp format
|
|
|
|
--
|
2007-11-18 21:06:32 +08:00
|
|
|
alter table Monitors modify column `LabelFormat` varchar(64) NOT NULL default '%N - %y/%m/%d %H:%M:%S';
|
2007-09-06 00:31:42 +08:00
|
|
|
|
2007-09-05 23:05:28 +08:00
|
|
|
--
|
|
|
|
-- Add a column for signal check colour
|
|
|
|
--
|
|
|
|
alter table Monitors add column `SignalCheckColour` varchar(32) NOT NULL default '#0100BE' after DefaultScale;
|
|
|
|
|
2007-04-03 17:59:59 +08:00
|
|
|
--
|
|
|
|
-- Increase the size of the run state definition column
|
|
|
|
--
|
|
|
|
alter table States modify column Definition text;
|
|
|
|
|
2007-06-05 22:12:14 +08:00
|
|
|
--
|
|
|
|
-- Add overload shutout to zones and presets
|
|
|
|
--
|
|
|
|
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;
|
|
|
|
|
2007-08-30 20:08:14 +08:00
|
|
|
--
|
|
|
|
-- 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;
|
|
|
|
|
2007-12-09 02:37:58 +08:00
|
|
|
--
|
|
|
|
-- Drop some duplicate/redundant indices
|
|
|
|
--
|
|
|
|
alter table Config drop index `UC_Name`;
|
|
|
|
alter table Controls drop index `UC_Id`;
|
|
|
|
alter table Devices drop index `UC_Id`;
|
|
|
|
alter table Events drop index `UC_Id`;
|
|
|
|
alter table Frames drop index `UC_Id`;
|
|
|
|
alter table Users drop index `UC_Id`;
|
|
|
|
alter table ZonePresets drop index `UC_Id`;
|
|
|
|
alter table Zones drop index `UC_Id`;
|
2007-12-09 21:44:47 +08:00
|
|
|
alter table Events drop primary key;
|
|
|
|
alter table Events add primary key ( `Id`, `MonitorId` );
|
|
|
|
alter table Events drop index `Id`;
|
2007-12-10 00:27:34 +08:00
|
|
|
alter table Frames drop column `Id`;
|
|
|
|
alter table Frames drop index `EventId`;
|
|
|
|
alter table Frames add primary key ( `EventId`, `FrameId` );
|
2007-12-09 02:37:58 +08:00
|
|
|
|
2007-04-03 17:59:59 +08:00
|
|
|
--
|
|
|
|
-- These are optional, but we might as well do it now
|
|
|
|
--
|
|
|
|
optimize table Frames;
|
|
|
|
optimize table Events;
|
|
|
|
optimize table Filters;
|
|
|
|
optimize table Zones;
|
|
|
|
optimize table Monitors;
|
|
|
|
optimize table Stats;
|