Removed Id from Filters table.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@933 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
06cc202f22
commit
ac3cd697ed
|
@ -1,12 +1,17 @@
|
|||
--
|
||||
-- This updates a 1.18.1 database to 1.19.0
|
||||
--
|
||||
-- Make changes to Zones table
|
||||
-- Make changes to Frames table
|
||||
--
|
||||
alter table Frames add column Type enum('Normal','Bulk','Alarm') NOT NULL default 'Normal' after FrameId;
|
||||
update Frames set Type = 'Alarm' where AlarmFrame = 1;
|
||||
alter table Frames drop column AlarmFrame;
|
||||
--
|
||||
-- Make changes to Filters table
|
||||
update Filters set Name = concat( Name, '_', Id );
|
||||
alter table Filters drop column Id;
|
||||
alter table Filters add primary key(Name);
|
||||
--
|
||||
-- These are optional, but we might as well
|
||||
--
|
||||
optimize table Frames;
|
||||
|
|
|
@ -67,7 +67,6 @@ CREATE TABLE Events (
|
|||
--
|
||||
|
||||
CREATE TABLE Filters (
|
||||
Id int(10) unsigned NOT NULL auto_increment,
|
||||
Name varchar(64) NOT NULL default '',
|
||||
Query text NOT NULL,
|
||||
AutoArchive tinyint(3) unsigned NOT NULL default '0',
|
||||
|
@ -75,7 +74,7 @@ CREATE TABLE Filters (
|
|||
AutoUpload tinyint(3) unsigned NOT NULL default '0',
|
||||
AutoEmail tinyint(3) unsigned NOT NULL default '0',
|
||||
AutoMessage tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (Id)
|
||||
PRIMARY KEY (Name)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue