Skip to content

Commit

Permalink
Bug 466 - Change old format PwF filters.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2320 e3e1d417-86f3-4887-817a-d78f3d33393f
  • Loading branch information
stan committed Feb 24, 2008
1 parent 5c3cefa commit c411eaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/zm_create.sql.in
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ insert into Users values ('','admin',password('admin'),'',1,'View','Edit','Edit'
--
-- Add a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
--
insert into Filters values ('PurgeWhenFull','a:4:{s:5:"terms";a:2:{i:0;a:3:{s:3:"val";s:1:"0";s:4:"attr";s:8:"Archived";s:2:"op";s:1:"=";}i:1;a:4:{s:3:"cnj";s:3:"and";s:3:"val";s:2:"95";s:4:"attr";s:11:"DiskPercent";s:2:"op";s:2:">=";}}s:10:"sort_field";s:2:"Id";s:8:"sort_asc";s:1:"1";s:5:"limit";s:2:"20";}',0,0,0,0,0,0,'',1,0);
insert into Filters values ('PurgeWhenFull','a:4:{s:5:"terms";a:2:{i:0;a:3:{s:3:"val";s:1:"0";s:4:"attr";s:8:"Archived";s:2:"op";s:1:"=";}i:1;a:4:{s:3:"cnj";s:3:"and";s:3:"val";s:2:"95";s:4:"attr";s:11:"DiskPercent";s:2:"op";s:2:">=";}}s:10:"sort_field";s:2:"Id";s:8:"sort_asc";s:1:"1";s:5:"limit";s:2:"5";}',0,0,0,0,0,0,'',1,0);

--
-- Add in some sample control protocol definitions
Expand Down
3 changes: 2 additions & 1 deletion db/zm_update-1.23.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
--

--
-- Rename typo version of PurgeWhenFull
-- Rename and fix typo version of PurgeWhenFull
--
update Filters set Name = "PurgeWhenFull" where Name = "xPurgeWhenFull";
update Filters set Query = 'a:4:{s:5:"terms";a:2:{i:0;a:3:{s:3:"val";s:1:"0";s:4:"attr";s:8:"Archived";s:2:"op";s:1:"=";}i:1;a:4:{s:3:"cnj";s:3:"and";s:3:"val";s:2:"95";s:4:"attr";s:11:"DiskPercent";s:2:"op";s:2:">=";}}s:10:"sort_field";s:2:"Id";s:8:"sort_asc";s:1:"1";s:5:"limit";s:2:"5";}' where Name = "PurgeWhenFull" and Query like "trms=%";

--
-- These are optional, but we might as well do it now
Expand Down

0 comments on commit c411eaf

Please sign in to comment.