2004-10-13 17:36:10 +08:00
|
|
|
--
|
2004-12-29 01:41:55 +08:00
|
|
|
-- This updates a 1.19.5 database to 1.20.0
|
2004-10-13 17:36:10 +08:00
|
|
|
--
|
2004-10-13 18:58:37 +08:00
|
|
|
-- Create the Groups table
|
|
|
|
--
|
|
|
|
CREATE TABLE Groups (
|
|
|
|
Id int(10) unsigned NOT NULL auto_increment,
|
|
|
|
Name varchar(64) NOT NULL,
|
|
|
|
MonitorIds tinytext NOT NULL,
|
|
|
|
PRIMARY KEY (Id)
|
|
|
|
) TYPE=MyISAM;
|
|
|
|
--
|
2004-12-30 02:03:13 +08:00
|
|
|
-- Make changes to Users table
|
|
|
|
--
|
|
|
|
alter table Users modify MonitorIds tinytext not null default '';
|
|
|
|
--
|
2004-12-29 01:41:55 +08:00
|
|
|
-- Make changes to Monitors table
|
|
|
|
--
|
|
|
|
alter table Monitors modify column Function enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor';
|
|
|
|
--
|
|
|
|
-- Make changes to Events table
|
|
|
|
--
|
|
|
|
alter table Events add column Cause varchar(32) not null default '' after Name;
|
|
|
|
alter table Events add column Notes tinytext after LearnState;
|
|
|
|
--
|
2004-10-13 17:36:10 +08:00
|
|
|
-- Add a new index to the Events table
|
|
|
|
--
|
|
|
|
alter table Events add index (Frames);
|
|
|
|
--
|
2004-10-13 18:58:37 +08:00
|
|
|
-- Rationalise some of the name columns
|
|
|
|
alter table Events modify column Name varchar(64) not null;
|
|
|
|
alter table Filters modify column Name varchar(64) not null;
|
|
|
|
alter table Monitors modify column Name varchar(64) not null;
|
|
|
|
alter table States modify column Name varchar(64) not null;
|
|
|
|
alter table Zones modify column Name varchar(64) not null;
|
|
|
|
--
|
2004-10-13 17:36:10 +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;
|