diff --git a/db/Makefile.am b/db/Makefile.am index ba633b665..02fac12c9 100644 --- a/db/Makefile.am +++ b/db/Makefile.am @@ -28,4 +28,5 @@ EXTRA_DIST = \ zm_update-1.21.1.sql \ zm_update-1.21.2.sql \ zm_update-1.21.3.sql \ - zm_update-1.21.4.sql + zm_update-1.21.4.sql \ + zm_update-1.22.0.sql diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 1732f1955..3211d20e4 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -496,11 +496,12 @@ INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg, max 5 FP -- -- Add some zone preset values -- -INSERT INTO ZonePresets VALUES (1,'Fast, low sensitivity','Active','Percent','AlarmedPixels',25,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -INSERT INTO ZonePresets VALUES (2,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',15,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -INSERT INTO ZonePresets VALUES (3,'Fast, high sensitivity','Active','Percent','AlarmedPixels',10,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -INSERT INTO ZonePresets VALUES (4,'Best, low sensitivity','Active','Percent','Blobs',25,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL); -INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',15,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL); +INSERT INTO ZonePresets VALUES (1,'Fast, low sensitivity','Active','Percent','AlarmedPixels',60,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO ZonePresets VALUES (2,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',40,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO ZonePresets VALUES (3,'Fast, high sensitivity','Active','Percent','AlarmedPixels',20,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO ZonePresets VALUES (4,'Best, low sensitivity','Active','Percent','Blobs',60,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL); +INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL); +INSERT INTO ZonePresets VALUES (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL); -- -- Apply the initial configuration diff --git a/db/zm_update-1.22.0.sql b/db/zm_update-1.22.0.sql new file mode 100644 index 000000000..b3e328426 --- /dev/null +++ b/db/zm_update-1.22.0.sql @@ -0,0 +1,19 @@ +-- +-- This updates a 1.22.0 database to 1.22.1 +-- +-- +-- Modify zone presets a bit +-- +UPDATE ZonePresets SET MinPixelThreshold = 60 WHERE Id = 1 OR Id = 4; +UPDATE ZonePresets SET MinPixelThreshold = 40 WHERE Id = 2 OR Id = 5; +UPDATE ZonePresets SET MinPixelThreshold = 20 WHERE Id = 3 OR Id = 6; + +-- +-- 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;