/*
SQLyog Community v12.2.5 (64 bit)
MySQL - 10.0.28-MariaDB : Database - test
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`test` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `test`;

/*Table structure for table `antivirusthreatlookup` */

DROP TABLE IF EXISTS `antivirusthreatlookup`;

CREATE TABLE `antivirusthreatlookup` (
  `AvThreatId` int(11) NOT NULL AUTO_INCREMENT,
  `ThreatName` varchar(100) NOT NULL,
  `ThreatDescription` varchar(1024) NOT NULL,
  PRIMARY KEY (`AvThreatId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `antivirusthreatlookup` */

/*Table structure for table `antivirusthreats` */

DROP TABLE IF EXISTS `antivirusthreats`;

CREATE TABLE `antivirusthreats` (
  `FoundThreatId` int(11) NOT NULL AUTO_INCREMENT,
  `ComputerId` int(11) NOT NULL,
  `AvPluginGUID` varchar(36) NOT NULL,
  `AvThreatId` int(11) NOT NULL,
  `DateOccurred` datetime NOT NULL,
  `DateReceived` datetime NOT NULL,
  `ThreatLevel` varchar(50) NOT NULL,
  `ThreatType` varchar(50) NOT NULL,
  `ThreatTarget` varchar(50) NOT NULL,
  `ThreatPath` varchar(1000) NOT NULL,
  `ActionTaken` varchar(1000) NOT NULL,
  `LevelLookupCategoryID` int(11) NOT NULL,
  `TargetLookupCategoryID` int(11) NOT NULL,
  `TypeLookupCategoryID` int(11) NOT NULL,
  `ActionTakenLookupCategoryID` int(11) NOT NULL,
  PRIMARY KEY (`FoundThreatId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `antivirusthreats` */

/*Table structure for table `computers` */

DROP TABLE IF EXISTS `computers`;

CREATE TABLE `computers` (
  `ComputerID` int(11) NOT NULL AUTO_INCREMENT,
  `ClientID` int(11) NOT NULL DEFAULT '0',
  `LocationID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(50) NOT NULL,
  `Domain` varchar(100) NOT NULL,
  `Username` varchar(1000) NOT NULL,
  `PCDate` varchar(30) NOT NULL,
  `TimeZone` decimal(11,1) NOT NULL DEFAULT '0.0',
  `OS` varchar(100) NOT NULL,
  `WinDir` varchar(50) NOT NULL,
  `Version` varchar(60) NOT NULL,
  `BiosName` varchar(100) NOT NULL,
  `BiosVer` varchar(100) NOT NULL,
  `BiosMFG` varchar(100) NOT NULL,
  `BiosFlash` varchar(100) NOT NULL,
  `USB` varchar(255) NOT NULL,
  `Tape` varchar(255) NOT NULL,
  `Sound` varchar(255) NOT NULL,
  `SCSI` varchar(255) NOT NULL,
  `Serial` varchar(255) NOT NULL,
  `Parallel` varchar(255) NOT NULL,
  `IRQ` varchar(255) NOT NULL,
  `DMA` varchar(255) NOT NULL,
  `Address` varchar(400) NOT NULL,
  `Ports` text NOT NULL,
  `Comment` varchar(500) NOT NULL,
  `Permissions` text NOT NULL,
  `ServiceVersion` varchar(8) NOT NULL,
  `LastContact` datetime NOT NULL,
  `Password` varchar(16) NOT NULL,
  `Memory` varchar(255) NOT NULL,
  `Video` varchar(255) NOT NULL,
  `Processors` varchar(255) NOT NULL,
  `Nic` varchar(255) NOT NULL,
  `DNSInfo` varchar(500) NOT NULL,
  `LastInventory` datetime NOT NULL,
  `CPUUsage` int(11) NOT NULL,
  `TotalMemory` int(11) NOT NULL,
  `MemoryAvail` int(11) NOT NULL,
  `LocalAddress` varchar(30) NOT NULL,
  `RouterAddress` varchar(30) NOT NULL,
  `flags` int(11) NOT NULL,
  `Modems` varchar(500) NOT NULL,
  `DistributedApps` varchar(400) NOT NULL DEFAULT ',',
  `Shares` varchar(500) NOT NULL,
  `BrowseList` varchar(2000) NOT NULL,
  `VirusScanner` varchar(50) NOT NULL,
  `VirusDefs` varchar(200) NOT NULL,
  `VirusAP` tinyint(4) NOT NULL,
  `WindowsUpdate` varchar(40) NOT NULL,
  `AssetTag` varchar(100) NOT NULL,
  `UserAccounts` longtext NOT NULL,
  `Licenses` varchar(500) NOT NULL,
  `LicensesInUse` varchar(200) NOT NULL,
  `ContactID` int(11) NOT NULL,
  `UpTime` bigint(20) NOT NULL,
  `DataIn` bigint(20) NOT NULL,
  `DataOut` bigint(20) NOT NULL,
  `UPS` varchar(255) NOT NULL,
  `Tweaks` varchar(255) NOT NULL,
  `tempfiles` bigint(20) NOT NULL,
  `Assetdate` datetime NOT NULL,
  `MAC` varchar(50) NOT NULL,
  `DateAdded` datetime NOT NULL,
  `bandwidth` int(11) NOT NULL,
  `LastUsername` varchar(1000) NOT NULL,
  `ScoreCPU` decimal(11,1) NOT NULL,
  `ScoreD3D` decimal(11,1) NOT NULL,
  `ScoreDisk` decimal(11,1) NOT NULL,
  `ScoreGraphics` decimal(11,1) NOT NULL,
  `ScoreMemory` decimal(11,1) NOT NULL,
  `PowerProfiles` varchar(500) NOT NULL,
  `CurrentPwrProfile` varchar(100) NOT NULL,
  `SNMPCommunity` varchar(255) NOT NULL,
  `FeatureFlags` int(11) NOT NULL,
  `Tracker` varchar(255) NOT NULL,
  `SNMPSysInfo` varchar(150) NOT NULL,
  `CollectionTemplate` int(11) NOT NULL,
  `DefaultRedirector` int(11) NOT NULL,
  `ManagementPort` int(11) NOT NULL,
  `ManagementIP` varchar(100) NOT NULL,
  `IdleTime` int(11) NOT NULL,
  `RunLevel` int(11) NOT NULL,
  `WarrantyEnd` datetime NOT NULL,
  `ObjectSid` varchar(184) NOT NULL,
  UNIQUE KEY `ComputerID` (`ComputerID`),
  KEY `ClientID` (`ClientID`),
  KEY `LocationID` (`LocationID`),
  KEY `CPUUsage` (`CPUUsage`),
  KEY `MemoryAvail` (`MemoryAvail`),
  KEY `flags` (`flags`),
  KEY `LocalAddress` (`LocalAddress`),
  KEY `RouterAddress` (`RouterAddress`),
  KEY `LastContact` (`LastContact`),
  KEY `Name` (`Name`),
  KEY `Password` (`Password`),
  KEY `MAC` (`MAC`),
  KEY `ServiceVersion` (`ServiceVersion`),
  KEY `tempfiles` (`tempfiles`),
  KEY `UserName` (`Username`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `computers` */

/*Table structure for table `usersec` */

DROP TABLE IF EXISTS `usersec`;

CREATE TABLE `usersec` (
  `UserID` int(11) NOT NULL,
  `ClientID` int(11) NOT NULL,
  `ComputerID` int(11) NOT NULL,
  `Permission` bigint(11) NOT NULL,
  PRIMARY KEY (`UserID`,`ClientID`,`ComputerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `usersec` */

/*Table structure for table `virusscanners` */

DROP TABLE IF EXISTS `virusscanners`;

CREATE TABLE `virusscanners` (
  `VScanID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(50) NOT NULL,
  `DefLocation` varchar(255) NOT NULL,
  `DefFilename` varchar(100) NOT NULL,
  `ProgLocation` varchar(255) NOT NULL,
  `UpdateCMD` varchar(255) NOT NULL,
  `ScanTemplate` varchar(200) NOT NULL,
  `AutoProtect` varchar(30) NOT NULL,
  `OsType` int(11) NOT NULL,
  `VersionCheck` varchar(255) NOT NULL,
  `VersionMask` varchar(255) NOT NULL,
  `InfectionCheck` varchar(255) NOT NULL,
  `InfectionMatch` varchar(255) NOT NULL,
  `GUID` varchar(36) DEFAULT NULL,
  PRIMARY KEY (`VScanID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `virusscanners` */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
