-- MySQL dump 10.9
--
-- Host: localhost    Database: srbmon2
-- ------------------------------------------------------
-- Server version	4.1.20

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `SEQUENCE`
--

DROP TABLE IF EXISTS `SEQUENCE`;
CREATE TABLE `SEQUENCE` (
  `SEQ_NAME` varchar(50) NOT NULL default '',
  `SEQ_COUNT` decimal(38,0) default NULL,
  PRIMARY KEY  (`SEQ_NAME`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `collection`
--

DROP TABLE IF EXISTS `collection`;
CREATE TABLE `collection` (
  `ID` bigint(20) NOT NULL default '0',
  `DIRECTORY` varchar(255) NOT NULL default '',
  `LASTSYNC` datetime default NULL,
  `NAME` varchar(255) NOT NULL default '',
  `STATE` char(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `logevent`
--

DROP TABLE IF EXISTS `logevent`;
CREATE TABLE `logevent` (
  `ID` bigint(20) NOT NULL default '0',
  `SESSION` bigint(20) default NULL,
  `PATH` text,
  `LOGTYPE` int(11) default NULL,
  `DATE` datetime default NULL,
  `DESCRIPTION` text,
  `COLLECTION_ID` bigint(20) default NULL,
  `REPLICA_ID` bigint(20) default NULL,
  PRIMARY KEY  (`ID`),
  KEY `FK_logevent_COLLECTION_ID` (`COLLECTION_ID`),
  KEY `FK_logevent_REPLICA_ID` (`REPLICA_ID`),
  KEY `logevent_path_idx` (`PATH`(512)),
  KEY `logevent_session_idx` (`SESSION`),
  KEY `logevent_type_idx` (`LOGTYPE`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `monitored_item`
--

DROP TABLE IF EXISTS `monitored_item`;
CREATE TABLE `monitored_item` (
  `ID` bigint(20) NOT NULL default '0',
  `DIRECTORY` tinyint(1) NOT NULL default '0',
  `LASTSEEN` datetime default NULL,
  `PATH` text,
  `STATE` char(1) NOT NULL default '',
  `PARENTPATH` text,
  `PARENTCOLLECTION_ID` bigint(20) NOT NULL default '0',
  `PARENTREPLICA_ID` bigint(20) default NULL,
  PRIMARY KEY  (`ID`),
  KEY `idx_monitored_item_path` (`PATH`(512)),
  KEY `FK_monitored_item_PARENTREPLICA_ID` (`PARENTREPLICA_ID`),
  KEY `FK_monitored_item_PARENTCOLLECTION_ID` (`PARENTCOLLECTION_ID`),
  KEY `logevent_parentpath_idx` (`PARENTPATH`(512)),
  KEY `idx_monitored_item_state` (`STATE`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `replica`
--

DROP TABLE IF EXISTS `replica`;
CREATE TABLE `replica` (
  `ID` bigint(20) NOT NULL default '0',
  `MCAT` varchar(255) NOT NULL default '',
  `DOMAIN` varchar(255) NOT NULL default '',
  `PASSWORD` varchar(255) NOT NULL default '',
  `PORT` int(11) NOT NULL default '0',
  `RESOURCE` varchar(255) NOT NULL default '',
  `DIRECTORY` varchar(255) NOT NULL default '',
  `ZONE` varchar(255) NOT NULL default '',
  `THREADS` int(11) default NULL,
  `USERNAME` varchar(255) NOT NULL default '',
  `COLLECTION_ID` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  KEY `FK_replica_COLLECTION_ID` (`COLLECTION_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `userroles`
--

DROP TABLE IF EXISTS `userroles`;
CREATE TABLE `userroles` (
  `ID` bigint(20) NOT NULL default '0',
  `USERNAME` varchar(255) default NULL,
  `ROLENAME` varchar(255) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `ID` bigint(20) NOT NULL default '0',
  `USERNAME` varchar(255) default NULL,
  `PASSWORD` varchar(255) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

