From fd81bcc1e78377ee87c596eb672b1470c00fb8dd Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 15 Jan 2003 10:04:53 +0000 Subject: [PATCH] Updated for version 0.9.8 git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@323 e3e1d417-86f3-4887-817a-d78f3d33393f --- db/zmalter-0.0.1.sql | 8 ++++++-- db/zmalter-0.9.7.sql | 8 +++++++- db/zmschema.sql.z | 16 ++++++++++------ 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/db/zmalter-0.0.1.sql b/db/zmalter-0.0.1.sql index dfed62ee5..428cba4b5 100644 --- a/db/zmalter-0.0.1.sql +++ b/db/zmalter-0.0.1.sql @@ -27,14 +27,18 @@ alter table Events add column TotScore int unsigned not null default 0 after Ala update Events set TotScore = AlarmFrames * AvgScore where TotScore = 0; alter table Events modify column Archived tinyint unsigned not null default 0; alter table Events add column Uploaded tinyint unsigned not null default 0 after Archived; +alter table Events add column Emailed tinyint unsigned not null default 0 after Uploaded; +alter table Events add column Messaged tinyint unsigned not null default 0 after Emailed; alter table Events add column LearnState char(1) default '' after Uploaded; CREATE TABLE Filters ( Id int(10) unsigned NOT NULL auto_increment, MonitorId int(10) unsigned NOT NULL default '0', Name varchar(64) NOT NULL default '', Query text NOT NULL, -AutoDelete tinyint(4) NOT NULL default '0', -AutoUpload tinyint(4) NOT NULL default '0', +AutoDelete tinyint(4) unsigned NOT NULL default '0', +AutoUpload tinyint(4) unsigned NOT NULL default '0', +AutoEmail tinyint(4) unsigned NOT NULL default '0', +AutoMessage tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (Id), UNIQUE KEY FilterIDX (MonitorId,Name) ) TYPE=MyISAM; diff --git a/db/zmalter-0.9.7.sql b/db/zmalter-0.9.7.sql index 3877cee89..68f7d5111 100644 --- a/db/zmalter-0.9.7.sql +++ b/db/zmalter-0.9.7.sql @@ -1,3 +1,9 @@ -- --- There are no database changes when upgrading from 0.9.7 to 0.9.8 +-- This updates a 0.9.7 database to 0.9.8 -- +alter table Filters modify column AutoDelete tinyint unsigned not null default 0; +alter table Filters modify column AutoUpload tinyint unsigned not null default 0; +alter table Filters add column AutoEmail tinyint unsigned not null default 0; +alter table Filters add column AutoMessage tinyint unsigned not null default 0; +alter table Events add column Emailed tinyint unsigned not null default 0 after Uploaded; +alter table Events add column Messaged tinyint unsigned not null default 0 after Emailed; diff --git a/db/zmschema.sql.z b/db/zmschema.sql.z index 4a5b9fc12..35782045a 100644 --- a/db/zmschema.sql.z +++ b/db/zmschema.sql.z @@ -1,16 +1,16 @@ -- MySQL dump 8.21 -- --- Host: localhost Database: zm +-- Host: localhost Database: ZM_DB_NAME --------------------------------------------------------- -- Server version 3.23.49 -- --- Current Database: zm +-- Current Database: ZM_DB_NAME -- -CREATE DATABASE /*!32312 IF NOT EXISTS*/ zm; +CREATE DATABASE /*!32312 IF NOT EXISTS*/ ZM_DB_NAME; -USE zm; +USE ZM_DB_NAME; -- -- Table structure for table 'Events' @@ -30,6 +30,8 @@ CREATE TABLE Events ( MaxScore tinyint(3) unsigned default '0', Archived tinyint(3) unsigned NOT NULL default '0', Uploaded tinyint(3) unsigned NOT NULL default '0', + Emailed tinyint(3) unsigned NOT NULL default '0', + Messaged tinyint(3) unsigned NOT NULL default '0', LearnState char(1) default '', PRIMARY KEY (Id), UNIQUE KEY UC_Id (Id), @@ -47,8 +49,10 @@ CREATE TABLE Filters ( MonitorId int(10) unsigned NOT NULL default '0', Name varchar(64) NOT NULL default '', Query text NOT NULL, - AutoDelete tinyint(4) NOT NULL default '0', - AutoUpload tinyint(4) NOT NULL default '0', + AutoDelete tinyint(3) unsigned NOT NULL default '0', + 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), UNIQUE KEY FilterIDX (MonitorId,Name) ) TYPE=MyISAM;