ports/multimedia/zoneminder/files/patch-db_zm_create.sql.in
Boris Samorodov 3e97341844 . update to version 1.24.4; changelog:
http://www.zoneminder.com/wiki/index.php/Change_History#Release_1.24.4_-_2011.2F05.2F30;
. remove patches that were incorporated upstream;
. add a patch to fix zm_stream.cpp (add one byte to the path length);  [1]
. add one more site to MASTER_SITES.

Submitted by:	Vladimir Pushkar <vladimir.pushkar@gmail.com> (via email)  [1]
2011-06-05 11:11:35 +00:00

155 lines
5.1 KiB
MySQL

--- db/zm_create.sql.in.orig 2011-01-10 15:34:49.000000000 +0300
+++ db/zm_create.sql.in 2011-05-05 17:58:17.886348039 +0400
@@ -41,7 +41,7 @@ CREATE TABLE `Config` (
`Readonly` tinyint(3) unsigned NOT NULL default '0',
`Requires` text,
PRIMARY KEY (`Name`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `ControlPresets`
@@ -53,7 +53,7 @@ CREATE TABLE `ControlPresets` (
`Preset` int(10) unsigned NOT NULL default '0',
`Label` varchar(64) NOT NULL default '',
PRIMARY KEY (`MonitorId`,`Preset`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Controls`
@@ -161,7 +161,7 @@ CREATE TABLE `Controls` (
`CanAutoScan` tinyint(3) unsigned NOT NULL default '0',
`NumScanPaths` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`Id`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Devices`
@@ -174,7 +174,7 @@ CREATE TABLE `Devices` (
`Type` enum('X10') NOT NULL default 'X10',
`KeyString` varchar(32) NOT NULL default '',
PRIMARY KEY (`Id`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Events`
@@ -208,7 +208,7 @@ CREATE TABLE `Events` (
KEY `StartTime` (`StartTime`),
KEY `Frames` (`Frames`),
KEY `Archived` (`Archived`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Filters`
@@ -228,7 +228,7 @@ CREATE TABLE `Filters` (
`AutoDelete` tinyint(3) unsigned NOT NULL default '0',
`Background` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`Name`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Frames`
@@ -245,7 +245,7 @@ CREATE TABLE `Frames` (
PRIMARY KEY (`EventId`,`FrameId`),
KEY `Type` (`Type`),
KEY `TimeStamp` (`TimeStamp`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Groups`
@@ -257,7 +257,7 @@ CREATE TABLE `Groups` (
`Name` varchar(64) NOT NULL default '',
`MonitorIds` tinytext NOT NULL,
PRIMARY KEY (`Id`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `MonitorPresets`
@@ -288,7 +288,7 @@ CREATE TABLE `MonitorPresets` (
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
PRIMARY KEY (`Id`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Monitors`
@@ -352,7 +352,7 @@ CREATE TABLE `Monitors` (
`WebColour` varchar(32) NOT NULL default 'red',
`Sequence` smallint(5) unsigned default NULL,
PRIMARY KEY (`Id`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `States`
@@ -363,7 +363,7 @@ CREATE TABLE `States` (
`Name` varchar(64) NOT NULL default '',
`Definition` text NOT NULL,
PRIMARY KEY (`Name`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Stats`
@@ -390,7 +390,7 @@ CREATE TABLE `Stats` (
KEY `EventId` (`EventId`),
KEY `MonitorId` (`MonitorId`),
KEY `ZoneId` (`ZoneId`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `TriggersX10`
@@ -403,7 +403,7 @@ CREATE TABLE `TriggersX10` (
`AlarmInput` varchar(32) default NULL,
`AlarmOutput` varchar(32) default NULL,
PRIMARY KEY (`MonitorId`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Users`
@@ -426,7 +426,7 @@ CREATE TABLE `Users` (
`MonitorIds` tinytext NOT NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `UC_Username` (`Username`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `ZonePresets`
@@ -453,7 +453,7 @@ CREATE TABLE `ZonePresets` (
`MaxBlobs` smallint(5) unsigned default NULL,
`OverloadFrames` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`Id`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
--
-- Table structure for table `Zones`
@@ -486,7 +486,7 @@ CREATE TABLE `Zones` (
`OverloadFrames` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`Id`),
KEY `MonitorId` (`MonitorId`)
-) ENGINE=@ZM_MYSQL_ENGINE@;
+);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
@@ -584,7 +584,7 @@ INSERT INTO MonitorPresets VALUES ('','B
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video (V4L1), NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100);
-INSERT INTO MonitorPresets VALUES ('','Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','<ip-address>',80,'/cgi-bin/nph-zms?mode=jpeg&monitor=<monitor-id>&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
+INSERT INTO MonitorPresets VALUES ('','Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','<ip-address>',80,'/cgi-bin/zms?mode=jpeg&monitor=<monitor-id>&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100);
--
-- Add some zone preset values