-- MySQL dump 10.11
--
-- Host: localhost    Database: HaCi
-- ------------------------------------------------------
-- Server version	5.0.51a-24+lenny5

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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 `CIDRmagic`
--

DROP TABLE IF EXISTS `CIDRmagic`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `CIDRmagic` (
  `cidr` int(11) NOT NULL,
  `adder` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`cidr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `audit`
--

DROP TABLE IF EXISTS `audit`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `audit` (
  `ID` int(11) NOT NULL auto_increment,
  `ts` datetime NOT NULL default '0000-00-00 00:00:00',
  `username` varchar(255) NOT NULL default '',
  `accessGroups` varchar(255) NOT NULL default '',
  `action` varchar(255) NOT NULL default '',
  `object` varchar(255) NOT NULL default '',
  `value` text NOT NULL,
  `error` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1920 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `network`
--

DROP TABLE IF EXISTS `network`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `network` (
  `ID` int(11) NOT NULL auto_increment,
  `rootID` int(11) NOT NULL default '0',
  `network` bigint(20) unsigned NOT NULL default '0',
  `description` varchar(255) NOT NULL default '',
  `state` smallint(6) NOT NULL default '0',
  `defSubnetSize` tinyint(4) unsigned NOT NULL default '0',
  `tmplID` int(11) NOT NULL default '0',
  `ipv6ID` varbinary(22) NOT NULL default '',
  `createFrom` varchar(255) NOT NULL default '',
  `createDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `modifyFrom` varchar(255) NOT NULL default '',
  `modifyDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `searchStr` varchar(255) default '',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `rootID` (`rootID`,`ipv6ID`,`network`),
  KEY `network` (`network`),
  KEY `description` (`description`),
  KEY `searchStr` (`searchStr`)
) ENGINE=InnoDB AUTO_INCREMENT=36230 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `networkAC`
--

DROP TABLE IF EXISTS `networkAC`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `networkAC` (
  `ID` int(11) NOT NULL auto_increment,
  `rootID` int(11) NOT NULL default '0',
  `network` bigint(40) NOT NULL default '0',
  `netID` int(11) NOT NULL default '0',
  `groupID` int(11) NOT NULL default '0',
  `ACL` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `netID` (`netID`,`groupID`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `networkLock`
--

DROP TABLE IF EXISTS `networkLock`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `networkLock` (
  `ID` int(11) NOT NULL auto_increment,
  `ts` datetime NOT NULL default '0000-00-00 00:00:00',
  `duration` int(11) NOT NULL default '0',
  `rootID` int(11) NOT NULL default '0',
  `networkPrefix` bigint(20) unsigned NOT NULL default '0',
  `hostPart` bigint(20) unsigned NOT NULL default '0',
  `cidr` smallint(6) NOT NULL default '0',
  `ipv6` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `rootID` (`rootID`,`networkPrefix`,`hostPart`,`cidr`,`ipv6`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `networkPlugin`
--

DROP TABLE IF EXISTS `networkPlugin`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `networkPlugin` (
  `ID` int(11) NOT NULL auto_increment,
  `netID` int(11) NOT NULL default '0',
  `pluginID` int(11) NOT NULL default '0',
  `sequence` int(11) NOT NULL default '0',
  `newLine` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `netID` (`netID`,`pluginID`)
) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `networkTag`
--

DROP TABLE IF EXISTS `networkTag`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `networkTag` (
  `ID` int(11) NOT NULL auto_increment,
  `netID` int(11) NOT NULL default '0',
  `tag` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `netID` (`netID`,`tag`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `networkV6`
--

DROP TABLE IF EXISTS `networkV6`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `networkV6` (
  `ID` varbinary(22) NOT NULL default '',
  `rootID` int(11) NOT NULL default '0',
  `networkPrefix` bigint(20) unsigned NOT NULL default '0',
  `hostPart` bigint(20) unsigned NOT NULL default '0',
  `cidr` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`ID`,`rootID`),
  UNIQUE KEY `rootID` (`rootID`,`networkPrefix`,`hostPart`,`cidr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `plugin`
--

DROP TABLE IF EXISTS `plugin`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `plugin` (
  `ID` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `filename` varchar(255) NOT NULL default '',
  `active` tinyint(4) NOT NULL default '0',
  `lastRun` datetime NOT NULL default '0000-00-00 00:00:00',
  `runTime` int(11) NOT NULL default '0',
  `lastError` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `pluginConf`
--

DROP TABLE IF EXISTS `pluginConf`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `pluginConf` (
  `ID` int(11) NOT NULL auto_increment,
  `netID` int(11) NOT NULL,
  `pluginID` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `netID` (`netID`,`pluginID`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `pluginValue`
--

DROP TABLE IF EXISTS `pluginValue`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `pluginValue` (
  `ID` int(11) NOT NULL auto_increment,
  `netID` int(11) NOT NULL,
  `pluginID` int(11) NOT NULL,
  `origin` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `netID` (`netID`,`pluginID`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `root`
--

DROP TABLE IF EXISTS `root`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `root` (
  `ID` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `ipv6` tinyint(1) NOT NULL default '0',
  `createFrom` varchar(255) NOT NULL default '',
  `createDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `modifyFrom` varchar(255) NOT NULL default '',
  `modifyDate` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `rootAC`
--

DROP TABLE IF EXISTS `rootAC`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `rootAC` (
  `ID` int(11) NOT NULL auto_increment,
  `rootID` int(11) NOT NULL default '0',
  `groupID` int(11) NOT NULL default '0',
  `ACL` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `rootID` (`rootID`,`groupID`)
) ENGINE=InnoDB AUTO_INCREMENT=156 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `setting`
--

DROP TABLE IF EXISTS `setting`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `setting` (
  `ID` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL default '0',
  `param` varchar(255) NOT NULL default '',
  `value` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `userID` (`userID`,`param`,`value`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `squad`
--

DROP TABLE IF EXISTS `squad`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `squad` (
  `ID` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `permissions` int(11) NOT NULL default '0',
  `createFrom` varchar(255) NOT NULL default '',
  `createDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `modifyFrom` varchar(255) NOT NULL default '',
  `modifyDate` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `template`
--

DROP TABLE IF EXISTS `template`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `template` (
  `ID` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `type` varchar(64) NOT NULL default '',
  `createFrom` varchar(255) NOT NULL default '',
  `createDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `modifyFrom` varchar(255) NOT NULL default '',
  `modifyDate` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `templateEntry`
--

DROP TABLE IF EXISTS `templateEntry`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `templateEntry` (
  `ID` int(11) NOT NULL auto_increment,
  `tmplID` int(11) NOT NULL default '0',
  `type` int(11) NOT NULL default '0',
  `position` int(11) NOT NULL default '0',
  `description` varchar(255) NOT NULL default '',
  `size` int(11) NOT NULL default '1',
  `entries` text NOT NULL,
  `rows` int(11) NOT NULL default '1',
  `cols` int(11) NOT NULL default '1',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `templateValue`
--

DROP TABLE IF EXISTS `templateValue`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `templateValue` (
  `ID` int(11) NOT NULL auto_increment,
  `tmplID` int(11) NOT NULL default '0',
  `tmplEntryID` int(11) NOT NULL default '0',
  `netID` int(11) NOT NULL default '0',
  `value` blob NOT NULL,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `netID` (`netID`,`tmplID`,`tmplEntryID`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `user`
--

DROP TABLE IF EXISTS `user`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `user` (
  `ID` int(11) NOT NULL auto_increment,
  `username` varchar(100) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `groupIDs` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `createFrom` varchar(255) NOT NULL default '',
  `createDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `modifyFrom` varchar(255) NOT NULL default '',
  `modifyDate` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!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 */;

-- Dump completed on 2015-01-03  5:02:35
