Files
OpenDRS/opendrs-initial.sql

317 lines
11 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','#000000'),(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.1.0','1.1.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,'period_eff_help_txt','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.');
/*!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 `periods`
--
DROP TABLE IF EXISTS `periods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `periods` (
`id` int(11) NOT NULL,
`times` 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 `periods`
--
LOCK TABLES `periods` WRITE;
/*!40000 ALTER TABLE `periods` DISABLE KEYS */;
INSERT INTO `periods` VALUES (1,'0600 brief, 0645 box, 0830 debrief, 0930 end',1),(2,'0745 brief, 0830 box, 1015 debrief, 1115 end',1),(3,'0930 brief, 1015 box, 1200 debrief, 1300 end',1),(4,'1115 brief, 1200 box, 1345 debrief, 1445 end',1),(5,'1300 brief, 1345 box, 1530 debrief, 1630 end',1),(6,'1445 brief, 1530 box, 1715 debrief, 1815 end',1),(7,'1630 brief, 1715 box, 1900 debrief, 2000 end',1),(8,'1815 brief, 1900 box, 2045 debrief, 2145 end',1);
/*!40000 ALTER TABLE `periods` 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 */;
/*!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,
`period` int(11) NOT NULL,
`period_effective` 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 */;
/*!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