Bug 382 - Added Devices tables to database

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2049 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2006-11-09 11:50:52 +00:00
parent 8a6d8da1ad
commit 2f0abc9833
1 changed files with 19 additions and 0 deletions

View File

@ -17,6 +17,13 @@ update Filters set Background = 1 where (AutoArchive = 1 or AutoVideo = 1 or Aut
--
alter table Monitors add column DefaultView enum ('Events','Control') not null default 'Events' after ReturnDelay;
--
-- Add device permissions column into Users, set the permissions for existing users to
-- be the same as for Monitors as a default
--
alter table Users add column Devices enum('None','View','Edit') NOT NULL default 'None' after Monitors;
update Users set Devices = Monitors;
--
-- Create new preset labels table
--
@ -27,6 +34,18 @@ CREATE TABLE `ControlPresets` (
PRIMARY KEY (`MonitorId`,`Preset`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Create new devices table
--
CREATE TABLE `Devices` (
`Id` int(10) unsigned NOT NULL auto_increment,
`Name` tinytext NOT NULL,
`Type` enum('X10') NOT NULL default 'X10',
`KeyString` varchar(32) NOT NULL default '',
PRIMARY KEY (`Id`),
UNIQUE KEY `UC_Id` (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- These are optional, but we might as well do it now
--