357 lines
12 KiB
SQL
357 lines
12 KiB
SQL
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
|
|
--
|
|
-- Host: localhost Database: opendrs
|
|
-- ------------------------------------------------------
|
|
-- Server version 5.7.21-0ubuntu0.16.04.1
|
|
|
|
/*!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 `banners`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `banners`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `banners` (
|
|
`bannerid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`bannername` tinytext,
|
|
`bannercolor` tinytext,
|
|
`textcolor` tinytext,
|
|
PRIMARY KEY (`bannerid`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `banners`
|
|
--
|
|
|
|
LOCK TABLES `banners` WRITE;
|
|
/*!40000 ALTER TABLE `banners` DISABLE KEYS */;
|
|
INSERT INTO `banners` VALUES
|
|
(1,'no banner','#000000','#FFFFFF'),
|
|
(2,'UNCLASSIFIED','#009900','#FFFFFF'),
|
|
(3,'CONFIDENTIAL','#000099','#FFFFFF'),
|
|
(4,'SECRET','#990000','#FFFFFF'),
|
|
(5,'TOP SECRET','#FF6600','#FFFFFF');
|
|
/*!40000 ALTER TABLE `banners` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `config`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `config`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `config` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` text,
|
|
`value` text,
|
|
`defaultvalue` text,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `config`
|
|
--
|
|
|
|
LOCK TABLES `config` WRITE;
|
|
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
|
|
INSERT INTO `config` VALUES
|
|
(1,'drs_version','1.4.0','1.4.0'),
|
|
(5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'),
|
|
(6,'banner','1','1'),
|
|
(7,'background_color','0B3144','0B3144'),
|
|
(8,'p_background_color','FFFFFF','FFFFFF'),
|
|
(11,'menubg_color','000000','000000'),
|
|
(12,'p_menubg_color','FFFFFF','FFFFFF'),
|
|
(13,'text_color','FFFFFF','FFFFFF'),
|
|
(14,'p_text_color','000000','000000'),
|
|
(15,'link_color','79EFEA','79EFEA'),
|
|
(16,'p_link_color','000000','000000'),
|
|
(17,'vlink_color','79EFEA','79EFEA'),
|
|
(18,'p_vlink_color','000000','000000'),
|
|
(19,'heading_color','5AE2B3','5AE2B3'),
|
|
(20,'p_heading_color','000000','000000'),
|
|
(21,'footer_message','Please report bugs to Rod Wright (software@rodsplace.net)','Please report bugs to Rod Wright (software@rodsplace.net)'),
|
|
(26,'unix_server_session_dir','/tmp/opendrs/opendrs/sessions','/tmp/opendrs/opendrs/sessions'),
|
|
(27,'win_server_session_dir','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions'),
|
|
(28,'session_ttl_days','30','30'),
|
|
(29,'functional_help_txt','If this discrepancy renders the device unusable, answer No. Otherwise, answer Yes.',
|
|
'If this discrepancy renders the device unusable, answer No. Otherwise, answer Yes.'),
|
|
(30,'device_term','Device','Device'),
|
|
(31,'discovered_term','When Discovered','When Discovered'),
|
|
(32,'discovered_term_short','When Disc','When Disc'),
|
|
(33,'functional_term','Functional','Functional'),
|
|
(34,'functional_term_short','Func','Func'),
|
|
(35,'functional_yes','Functional','Functional'),
|
|
(36,'functional_no','Non-functional','Non-functional'),
|
|
(37,'functional_yes_short','OK','OK'),
|
|
(38,'functional_no_short','INOP','INOP'),
|
|
(39,'disc_drop_data','Name','Name'),
|
|
(40,'access_mode','trusted','trusted');
|
|
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `groups`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `groups`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `groups` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` text,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `groups`
|
|
--
|
|
|
|
LOCK TABLES `groups` WRITE;
|
|
/*!40000 ALTER TABLE `groups` DISABLE KEYS */;
|
|
/*!40000 ALTER TABLE `groups` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `links`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `links`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `links` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`linkgroup` int(11) NOT NULL,
|
|
`writeupid` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `links`
|
|
--
|
|
|
|
LOCK TABLES `links` WRITE;
|
|
/*!40000 ALTER TABLE `links` DISABLE KEYS */;
|
|
/*!40000 ALTER TABLE `links` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `discovered`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `discovered`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `discovered` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`whendiscoveredname` text NOT NULL,
|
|
`whendiscovereddesc` text NOT NULL,
|
|
`active` tinyint(1) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `discovered`
|
|
--
|
|
|
|
LOCK TABLES `discovered` WRITE;
|
|
/*!40000 ALTER TABLE `discovered` DISABLE KEYS */;
|
|
INSERT INTO `discovered` VALUES (1,'Install','Initial installation',1);
|
|
/*!40000 ALTER TABLE `discovered` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `profile`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `profile`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `profile` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` text,
|
|
`user` int(11) NOT NULL,
|
|
`value` text,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `profile`
|
|
--
|
|
|
|
LOCK TABLES `profile` WRITE;
|
|
/*!40000 ALTER TABLE `profile` DISABLE KEYS */;
|
|
/*!40000 ALTER TABLE `profile` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `reasons`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `reasons`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `reasons` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`text` tinytext NOT NULL,
|
|
`active` tinyint(1) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `reasons`
|
|
--
|
|
|
|
LOCK TABLES `reasons` WRITE;
|
|
/*!40000 ALTER TABLE `reasons` DISABLE KEYS */;
|
|
INSERT INTO `reasons` VALUES (1,'Repaired/Resolved',1),(2,'Invalid Writeup',1),(3,'Entered In Error',1),(4,'Software Error',1),(5,'Awaiting Maintenance',1),(6,'Awaiting Parts',1),(7,'Awaiting Software',1),(8,'Awaiting Test',1),(9,'Duplicate Writeup',1),(10,'Operator Error',1);
|
|
/*!40000 ALTER TABLE `reasons` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `subsystems`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `subsystems`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `subsystems` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` tinytext NOT NULL,
|
|
`description` text,
|
|
`active` tinyint(1) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `subsystems`
|
|
--
|
|
|
|
LOCK TABLES `subsystems` WRITE;
|
|
/*!40000 ALTER TABLE `subsystems` DISABLE KEYS */;
|
|
INSERT INTO `subsystems` VALUES (1,'Unknown','Unknown subsystem or things that will not fit any other subsystem listed',1),(2,'Multiple','A combination of two or more subsystems.',1);
|
|
/*!40000 ALTER TABLE `subsystems` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `devices`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `devices`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `devices` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name` tinytext NOT NULL,
|
|
`active` tinyint(1) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `devices`
|
|
--
|
|
|
|
LOCK TABLES `devices` WRITE;
|
|
/*!40000 ALTER TABLE `devices` DISABLE KEYS */;
|
|
INSERT INTO `devices` VALUES (1,'OpenDRS Server',1);
|
|
/*!40000 ALTER TABLE `devices` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `users`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `users` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`firstname` tinytext NOT NULL,
|
|
`lastname` tinytext NOT NULL,
|
|
`login` tinytext NOT NULL,
|
|
`password_hash` text NOT NULL,
|
|
`role` int(11) NOT NULL,
|
|
`active` tinyint(1) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `users`
|
|
--
|
|
|
|
LOCK TABLES `users` WRITE;
|
|
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
|
INSERT INTO `users` VALUES (1,'DRS','Admin','drsadmin','$2y$10$y2yH664XQtG9OHmT3jl.yO2ZlwZpBKRMrp9TFlXoTMcWFs/X5ngf6',2,1);
|
|
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `writeups`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `writeups`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `writeups` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`device` int(11) NOT NULL,
|
|
`discovered` int(11) NOT NULL,
|
|
`functional` tinyint(1) NOT NULL,
|
|
`reported_by` tinytext NOT NULL,
|
|
`report_date` date NOT NULL,
|
|
`report_time` time NOT NULL,
|
|
`subsystem` int(11) NOT NULL,
|
|
`discrepancy_text` text NOT NULL,
|
|
`status` int(1) NOT NULL DEFAULT '1',
|
|
`action_by` int(11) NOT NULL DEFAULT '0',
|
|
`action_date` date DEFAULT NULL,
|
|
`action_time` time DEFAULT NULL,
|
|
`action_reason` int(11) NOT NULL DEFAULT '0',
|
|
`action_text` text,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `writeups`
|
|
--
|
|
|
|
LOCK TABLES `writeups` WRITE;
|
|
/*!40000 ALTER TABLE `writeups` DISABLE KEYS */;
|
|
INSERT INTO `writeups` VALUES (1,1,1,1,'R. Wright',CURRENT_DATE(),CURRENT_TIME(),1,'This is a new installation of OpenDRS. There is one admin user (username: drsadmin password: OpenDRS-1). You should immediately log in and click on Manage Database under Admin Functions, go to the User Management tab, and add yourself as a new user, making sure to click the Admin checkbox to give yourself admin rights. You should then edit the DRS Admin user by clicking the User ID number in the table of existing users, and uncheck the Active checkbox. After you have done that, you can close this writeup.',1,0,NULL,NULL,0,NULL);
|
|
/*!40000 ALTER TABLE `writeups` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
/*!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 2018-03-13 12:45:45
|