Skip to content

Instantly share code, notes, and snippets.

@nonsensecreativity
Forked from zidarsk8/assessment.sql
Created April 20, 2017 05:25
Show Gist options
  • Save nonsensecreativity/575c79e2af5e94d44c8d7d659276847e to your computer and use it in GitHub Desktop.
Save nonsensecreativity/575c79e2af5e94d44c8d7d659276847e to your computer and use it in GitHub Desktop.
-- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: ggrcdev
-- ------------------------------------------------------
-- Server version 5.5.49-0ubuntu0.14.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 `access_groups`
--
DROP TABLE IF EXISTS `access_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `access_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`os_state` varchar(250) NOT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`notes` text,
`description` text,
`url` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_access_groups` (`slug`),
UNIQUE KEY `uq_t_access_groups` (`title`),
KEY `fk_access_groups_contact` (`contact_id`),
KEY `fk_access_groups_contexts` (`context_id`),
KEY `fk_access_groups_secondary_contact` (`secondary_contact_id`),
KEY `ix_access_groups_updated_at` (`updated_at`),
CONSTRAINT `access_groups_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `access_groups_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `access_groups_ibfk_3` FOREIGN KEY (`secondary_contact_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `access_groups`
--
LOCK TABLES `access_groups` WRITE;
/*!40000 ALTER TABLE `access_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `access_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `assessment_templates`
--
DROP TABLE IF EXISTS `assessment_templates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `assessment_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_object_type` varchar(250) DEFAULT NULL,
`test_plan_procedure` tinyint(1) NOT NULL DEFAULT '0',
`procedure_description` text,
`default_people` text NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
KEY `context_id` (`context_id`),
CONSTRAINT `assessment_templates_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `assessment_templates`
--
LOCK TABLES `assessment_templates` WRITE;
/*!40000 ALTER TABLE `assessment_templates` DISABLE KEYS */;
INSERT INTO `assessment_templates` VALUES (1,'Control',1,'','{\"assessors\":\"Object Owners\",\"verifiers\":\"Object Owners\"}','2016-08-05 15:49:43',1,'2016-08-05 15:49:43',5,'aaa','TEMPLATE-1');
/*!40000 ALTER TABLE `assessment_templates` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `assessments`
--
DROP TABLE IF EXISTS `assessments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `assessments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`design` varchar(250) DEFAULT NULL,
`operationally` varchar(250) DEFAULT NULL,
`os_state` varchar(250) NOT NULL,
`test_plan` text,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`status` enum('Not Started','In Progress','Ready for Review','Verified','Completed') NOT NULL,
`notes` text,
`description` text,
`url` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`control_id` int(11) DEFAULT NULL,
`finished_date` datetime DEFAULT NULL,
`verified_date` datetime DEFAULT NULL,
`recipients` varchar(250) DEFAULT NULL,
`send_by_default` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_control_assessments` (`slug`),
KEY `contact_id` (`contact_id`),
KEY `context_id` (`context_id`),
KEY `secondary_contact_id` (`secondary_contact_id`),
KEY `fk_control_control_assessment` (`control_id`),
CONSTRAINT `assessments_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `assessments_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `assessments_ibfk_3` FOREIGN KEY (`secondary_contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `fk_control_control_assessment` FOREIGN KEY (`control_id`) REFERENCES `controls` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `assessments`
--
LOCK TABLES `assessments` WRITE;
/*!40000 ALTER TABLE `assessments` DISABLE KEYS */;
INSERT INTO `assessments` VALUES (1,'','','Modified','uoaeuoaeuoe',NULL,NULL,'Ready for Review',NULL,NULL,NULL,NULL,NULL,NULL,'oauoa assessment for 2016: oauo - Audit 1','ASSESSMENT-1','2016-08-05 15:49:55',1,'2016-08-05 15:56:36',5,NULL,'2016-08-05 15:56:36',NULL,'',NULL);
/*!40000 ALTER TABLE `assessments` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `audit_objects`
--
DROP TABLE IF EXISTS `audit_objects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `audit_objects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) NOT NULL,
`audit_id` int(11) NOT NULL,
`auditable_id` int(11) NOT NULL,
`auditable_type` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `audit_id` (`audit_id`,`auditable_id`,`auditable_type`),
KEY `context_id` (`context_id`),
CONSTRAINT `audit_objects_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `audit_objects_ibfk_2` FOREIGN KEY (`audit_id`) REFERENCES `audits` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `audit_objects`
--
LOCK TABLES `audit_objects` WRITE;
/*!40000 ALTER TABLE `audit_objects` DISABLE KEYS */;
/*!40000 ALTER TABLE `audit_objects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `audits`
--
DROP TABLE IF EXISTS `audits`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `audits` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`report_start_date` date DEFAULT NULL,
`report_end_date` date DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` enum('Planned','In Progress','Manager Review','Ready for External Review','Completed') NOT NULL,
`gdrive_evidence_folder` varchar(250) DEFAULT NULL,
`program_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`notes` text,
`audit_firm_id` int(11) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`object_type` varchar(250) NOT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_t_audits` (`title`),
KEY `program_id` (`program_id`),
KEY `fk_audits_contact` (`contact_id`),
KEY `fk_audits_contexts` (`context_id`),
KEY `ix_audits_updated_at` (`updated_at`),
KEY `fk_audits_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `audits_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `audits_ibfk_3` FOREIGN KEY (`program_id`) REFERENCES `programs` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `audits`
--
LOCK TABLES `audits` WRITE;
/*!40000 ALTER TABLE `audits` DISABLE KEYS */;
INSERT INTO `audits` VALUES (1,'2016: oauo - Audit 1','AUDIT-1','',NULL,NULL,NULL,NULL,NULL,1,'',NULL,1,'2016-08-05 15:48:50',1,'2016-08-05 15:48:50',5,NULL,NULL,NULL,'Assessment',NULL);
/*!40000 ALTER TABLE `audits` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `background_tasks`
--
DROP TABLE IF EXISTS `background_tasks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `background_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`parameters` mediumblob,
`result` mediumblob,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_background_tasks_contexts` (`context_id`),
KEY `ix_background_tasks_updated_at` (`updated_at`),
CONSTRAINT `background_tasks_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `background_tasks`
--
LOCK TABLES `background_tasks` WRITE;
/*!40000 ALTER TABLE `background_tasks` DISABLE KEYS */;
INSERT INTO `background_tasks` VALUES (1,'POST1470412195','S\'[{\"assessment\":{\"status\":\"Not Started\",\"_generated\":true,\"audit\":{\"id\":1,\"href\":\"/api/audits/1\",\"type\":\"Audit\"},\"object\":{\"id\":1,\"href\":\"/api/controls/1\",\"type\":\"Control\"},\"context\":{\"id\":5,\"href\":\"/api/contexts/5\",\"type\":\"Context\"},\"template\":{\"id\":1,\"href\":\"/api/assessment_templates/1\",\"type\":\"AssessmentTemplate\"},\"title\":\"oauoa assessment for 2016: oauo - Audit 1\",\"owners\":[{\"id\":1,\"href\":\"/api/people/1\",\"type\":\"Person\"}],\"test_plan\":\"uoaeuoaeuoe\",\"run_in_background\":true,\"_pending_joins\":[],\"program\":{\"id\":1,\"href\":\"/api/programs/1\",\"type\":\"Program\"}}}]\'\np0\n.','(dp0\nS\'content\'\np1\nS\'[[201, {}]]\'\np2\nsS\'status_code\'\np3\nI200\nsS\'headers\'\np4\n(lp5\n(S\'Content-Type\'\np6\nVapplication/json\np7\ntp8\na(S\'Content-Length\'\np9\nV11\np10\ntp11\nas.','2016-08-05 15:49:55',1,'2016-08-05 15:49:55',NULL,'Success');
/*!40000 ALTER TABLE `background_tasks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `categories`
--
DROP TABLE IF EXISTS `categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`name` varchar(250) DEFAULT NULL,
`lft` int(11) DEFAULT NULL,
`rgt` int(11) DEFAULT NULL,
`scope_id` int(11) DEFAULT NULL,
`depth` int(11) DEFAULT NULL,
`required` tinyint(1) DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`type` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`),
KEY `fk_categories_contexts` (`context_id`),
KEY `ix_categories_updated_at` (`updated_at`),
CONSTRAINT `fk_categories_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `categories`
--
LOCK TABLES `categories` WRITE;
/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
INSERT INTO `categories` VALUES (37,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Confidentiality',NULL,NULL,102,NULL,NULL,NULL,NULL,'ControlAssertion'),(38,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Integrity',NULL,NULL,102,NULL,NULL,NULL,NULL,'ControlAssertion'),(39,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Availability',NULL,NULL,102,NULL,NULL,NULL,NULL,'ControlAssertion'),(40,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Security',NULL,NULL,102,NULL,NULL,NULL,NULL,'ControlAssertion'),(41,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Privacy',NULL,NULL,102,NULL,NULL,NULL,NULL,'ControlAssertion'),(42,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Org and Admin/Governance',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(43,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Training',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(44,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Policies & Procedures',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(45,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','HR',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(46,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Logical Access/ Access Control',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(47,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Access Management',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(48,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Authorization',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(49,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Authentication',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(50,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Change Management',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(51,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Segregation of Duties',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(52,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Configuration Management',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(53,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Package Verification and Code release',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(54,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Incident Management',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(55,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Monitoring ',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(56,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Process',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(57,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Business Continuity',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(58,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Disaster Recovery',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(59,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Restoration Tests',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(60,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Backup Logs ',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(61,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Replication',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(62,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Data Protection and Retention',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(63,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Physical Security',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(64,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Data Centers',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory'),(65,NULL,'2016-05-03 10:37:03','2016-05-03 10:37:03','Sites',NULL,NULL,100,NULL,NULL,NULL,NULL,'ControlCategory');
/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `categorizations`
--
DROP TABLE IF EXISTS `categorizations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categorizations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`category_id` int(11) NOT NULL,
`categorizable_id` int(11) DEFAULT NULL,
`categorizable_type` varchar(250) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`category_type` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `category_id` (`category_id`),
KEY `fk_categorizations_contexts` (`context_id`),
KEY `ix_categorizations_updated_at` (`updated_at`),
CONSTRAINT `categorizations_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
CONSTRAINT `fk_categorizations_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `categorizations`
--
LOCK TABLES `categorizations` WRITE;
/*!40000 ALTER TABLE `categorizations` DISABLE KEYS */;
INSERT INTO `categorizations` VALUES (1,1,'2016-08-05 15:49:07','2016-08-05 15:49:07',40,1,'Control',NULL,'ControlAssertion'),(2,1,'2016-08-05 15:49:07','2016-08-05 15:49:07',39,1,'Control',NULL,'ControlAssertion'),(3,1,'2016-08-05 15:49:07','2016-08-05 15:49:07',41,1,'Control',NULL,'ControlAssertion');
/*!40000 ALTER TABLE `categorizations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `clauses`
--
DROP TABLE IF EXISTS `clauses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clauses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`na` tinyint(1) NOT NULL,
`notes` text,
`os_state` varchar(250) NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_clauses` (`slug`),
UNIQUE KEY `uq_t_clauses` (`title`),
KEY `contact_id` (`contact_id`),
KEY `context_id` (`context_id`),
KEY `parent_id` (`parent_id`),
KEY `secondary_contact_id` (`secondary_contact_id`),
CONSTRAINT `clauses_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `clauses_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `clauses_ibfk_3` FOREIGN KEY (`parent_id`) REFERENCES `clauses` (`id`),
CONSTRAINT `clauses_ibfk_4` FOREIGN KEY (`secondary_contact_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `clauses`
--
LOCK TABLES `clauses` WRITE;
/*!40000 ALTER TABLE `clauses` DISABLE KEYS */;
/*!40000 ALTER TABLE `clauses` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` text,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`assignee_type` text,
`revision_id` int(11) DEFAULT NULL,
`custom_attribute_definition_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `context_id` (`context_id`),
KEY `fk_comments_revisions` (`revision_id`),
KEY `fk_comments_custom_attribute_definitions` (`custom_attribute_definition_id`),
CONSTRAINT `fk_comments_custom_attribute_definitions` FOREIGN KEY (`custom_attribute_definition_id`) REFERENCES `custom_attribute_definitions` (`id`),
CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `fk_comments_revisions` FOREIGN KEY (`revision_id`) REFERENCES `revisions` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `comments`
--
LOCK TABLES `comments` WRITE;
/*!40000 ALTER TABLE `comments` DISABLE KEYS */;
INSERT INTO `comments` VALUES (1,'auoeuo','2016-08-05 15:51:23',1,'2016-08-05 15:51:23',5,NULL,NULL,NULL),(2,'aoeuaouoa','2016-08-05 15:56:25',1,'2016-08-05 15:56:25',5,NULL,42,2),(3,'uoaeuoeuao','2016-08-05 16:00:29',1,'2016-08-05 16:00:29',5,NULL,52,2);
/*!40000 ALTER TABLE `comments` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `context_implications`
--
DROP TABLE IF EXISTS `context_implications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `context_implications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`context_id` int(11) DEFAULT NULL,
`source_context_id` int(11) DEFAULT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_scope` varchar(128) DEFAULT NULL,
`source_context_scope` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_context_implications_contexts` (`context_id`),
KEY `ix_context_implications_updated_at` (`updated_at`),
KEY `ix_context_implications_source_id` (`source_context_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `context_implications`
--
LOCK TABLES `context_implications` WRITE;
/*!40000 ALTER TABLE `context_implications` DISABLE KEYS */;
INSERT INTO `context_implications` VALUES (1,NULL,NULL,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,NULL),(2,NULL,4,1,'2016-08-05 15:48:44','2016-08-05 15:48:44',NULL,'Program'),(3,4,NULL,1,'2016-08-05 15:48:44','2016-08-05 15:48:44','Program',NULL),(4,5,4,1,'2016-08-05 15:48:50','2016-08-05 15:48:50','Audit','Program'),(5,4,5,1,'2016-08-05 15:48:50','2016-08-05 15:48:50','Program','Audit'),(6,NULL,5,1,'2016-08-05 15:48:50','2016-08-05 15:48:50',NULL,'Audit');
/*!40000 ALTER TABLE `context_implications` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `contexts`
--
DROP TABLE IF EXISTS `contexts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contexts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) DEFAULT NULL,
`description` text,
`related_object_id` int(11) DEFAULT NULL,
`related_object_type` varchar(128) DEFAULT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_contexts_contexts` (`context_id`),
KEY `ix_context_related_object` (`related_object_type`,`related_object_id`),
KEY `ix_contexts_updated_at` (`updated_at`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `contexts`
--
LOCK TABLES `contexts` WRITE;
/*!40000 ALTER TABLE `contexts` DISABLE KEYS */;
INSERT INTO `contexts` VALUES (0,'System Administration','Context for super-user permissions.',NULL,NULL,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL),(1,'Administration','Context for Administrative resources.',NULL,NULL,0,'2016-08-05 15:48:26','2016-08-05 15:48:26',1),(3,'Personal Context for user@example.com','',1,'Person',1,'2016-08-05 15:48:35','2016-08-05 15:48:44',4),(4,'Program Context 2016-08-05 15:48:44.549852','',1,'Program',1,'2016-08-05 15:48:44','2016-08-05 15:48:50',5),(5,'Audit Context 2016-08-05 15:48:50.475367','',1,'Audit',1,'2016-08-05 15:48:50','2016-08-05 15:48:50',NULL);
/*!40000 ALTER TABLE `contexts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `controls`
--
DROP TABLE IF EXISTS `controls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `controls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`directive_id` int(11) DEFAULT NULL,
`kind_id` int(11) DEFAULT NULL,
`means_id` int(11) DEFAULT NULL,
`version` varchar(250) DEFAULT NULL,
`documentation_description` text,
`verify_frequency_id` int(11) DEFAULT NULL,
`fraud_related` tinyint(1) DEFAULT NULL,
`key_control` tinyint(1) DEFAULT NULL,
`active` tinyint(1) DEFAULT NULL,
`notes` text,
`parent_id` int(11) DEFAULT NULL,
`company_control` tinyint(1) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`principal_assessor_id` int(11) DEFAULT NULL,
`secondary_assessor_id` int(11) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
`test_plan` text,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_controls` (`slug`),
UNIQUE KEY `uq_t_controls` (`title`),
KEY `directive_id` (`directive_id`),
KEY `parent_id` (`parent_id`),
KEY `fk_controls_contexts` (`context_id`),
KEY `fk_controls_contact` (`contact_id`),
KEY `ix_controls_principal_assessor` (`principal_assessor_id`),
KEY `ix_controls_secondary_assessor` (`secondary_assessor_id`),
KEY `ix_controls_updated_at` (`updated_at`),
KEY `fk_controls_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `controls_ibfk_1` FOREIGN KEY (`directive_id`) REFERENCES `directives` (`id`),
CONSTRAINT `controls_ibfk_2` FOREIGN KEY (`parent_id`) REFERENCES `controls` (`id`),
CONSTRAINT `fk_controls_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `controls`
--
LOCK TABLES `controls` WRITE;
/*!40000 ALTER TABLE `controls` DISABLE KEYS */;
INSERT INTO `controls` VALUES (1,1,'2016-08-05 15:49:07','2016-08-05 15:49:07','oeuoeoae','',NULL,NULL,'CONTROL-1','oauoa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,1,'Draft',NULL,NULL,'',NULL,'Modified','uoaeuoaeuoe');
/*!40000 ALTER TABLE `controls` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `custom_attribute_definitions`
--
DROP TABLE IF EXISTS `custom_attribute_definitions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `custom_attribute_definitions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`title` varchar(250) NOT NULL,
`helptext` varchar(250) DEFAULT NULL,
`placeholder` varchar(250) DEFAULT NULL,
`definition_type` varchar(250) NOT NULL,
`attribute_type` varchar(250) NOT NULL,
`multi_choice_options` text,
`mandatory` tinyint(1) DEFAULT NULL,
`definition_id` int(11) DEFAULT NULL,
`multi_choice_mandatory` text,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_custom_attribute` (`definition_type`,`definition_id`,`title`),
KEY `ix_custom_attributes_title` (`title`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `custom_attribute_definitions`
--
LOCK TABLES `custom_attribute_definitions` WRITE;
/*!40000 ALTER TABLE `custom_attribute_definitions` DISABLE KEYS */;
INSERT INTO `custom_attribute_definitions` VALUES (1,NULL,NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43','aa',NULL,NULL,'assessment_template','Dropdown','a,b,c,d,e',NULL,1,'0,0,2,1,3'),(2,NULL,NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43','aa',NULL,NULL,'assessment','Dropdown','a,b,c,d,e',NULL,1,'0,0,2,1,3');
/*!40000 ALTER TABLE `custom_attribute_definitions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `custom_attribute_values`
--
DROP TABLE IF EXISTS `custom_attribute_values`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `custom_attribute_values` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`custom_attribute_id` int(11) NOT NULL,
`attributable_id` int(11) DEFAULT NULL,
`attributable_type` varchar(250) DEFAULT NULL,
`attribute_value` text,
`attribute_object_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_custom_attribute_value` (`custom_attribute_id`,`attributable_id`),
KEY `custom_attribute_values_ibfk_1` (`custom_attribute_id`),
KEY `ix_custom_attributes_attributable` (`attributable_id`,`attributable_type`),
CONSTRAINT `custom_attribute_values_ibfk_1` FOREIGN KEY (`custom_attribute_id`) REFERENCES `custom_attribute_definitions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `custom_attribute_values`
--
LOCK TABLES `custom_attribute_values` WRITE;
/*!40000 ALTER TABLE `custom_attribute_values` DISABLE KEYS */;
INSERT INTO `custom_attribute_values` VALUES (5,NULL,NULL,'2016-08-05 16:00:22','2016-08-05 16:00:22',2,1,'Assessment','d',NULL);
/*!40000 ALTER TABLE `custom_attribute_values` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cycle_task_entries`
--
DROP TABLE IF EXISTS `cycle_task_entries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cycle_task_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cycle_task_group_object_task_id` int(11) NOT NULL,
`description` text,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`cycle_id` int(11) NOT NULL,
`_is_declining_review` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_cycle_task_entries_contexts` (`context_id`),
KEY `ix_cycle_task_entries_updated_at` (`updated_at`),
KEY `cycle_task_entries_cycle` (`cycle_id`),
KEY `cycle_task_entries_ibfk_2` (`cycle_task_group_object_task_id`),
CONSTRAINT `cycle_task_entries_cycle` FOREIGN KEY (`cycle_id`) REFERENCES `cycles` (`id`) ON DELETE CASCADE,
CONSTRAINT `cycle_task_entries_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `cycle_task_entries_ibfk_2` FOREIGN KEY (`cycle_task_group_object_task_id`) REFERENCES `cycle_task_group_object_tasks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cycle_task_entries`
--
LOCK TABLES `cycle_task_entries` WRITE;
/*!40000 ALTER TABLE `cycle_task_entries` DISABLE KEYS */;
/*!40000 ALTER TABLE `cycle_task_entries` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cycle_task_group_object_tasks`
--
DROP TABLE IF EXISTS `cycle_task_group_object_tasks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cycle_task_group_object_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cycle_task_group_object_id` int(11) DEFAULT NULL,
`task_group_task_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`sort_index` varchar(250) NOT NULL,
`cycle_id` int(11) NOT NULL,
`response_options` text NOT NULL,
`selected_response_options` text NOT NULL,
`task_type` varchar(250) NOT NULL,
`cycle_task_group_id` int(11) NOT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`finished_date` datetime DEFAULT NULL,
`verified_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_slug` (`slug`),
KEY `cycle_task_group_object_id` (`cycle_task_group_object_id`),
KEY `task_group_task_id` (`task_group_task_id`),
KEY `fk_cycle_task_group_object_tasks_contact` (`contact_id`),
KEY `fk_cycle_task_group_object_tasks_contexts` (`context_id`),
KEY `ix_cycle_task_group_object_tasks_updated_at` (`updated_at`),
KEY `fk_cycle_task_group_object_tasks_secondary_contact` (`secondary_contact_id`),
KEY `cycle_task_group_object_tasks_cycle` (`cycle_id`),
KEY `cycle_task_group_id` (`cycle_task_group_id`),
CONSTRAINT `cycle_task_group_id` FOREIGN KEY (`cycle_task_group_id`) REFERENCES `cycle_task_groups` (`id`) ON DELETE CASCADE,
CONSTRAINT `cycle_task_group_object_tasks_cycle` FOREIGN KEY (`cycle_id`) REFERENCES `cycles` (`id`) ON DELETE CASCADE,
CONSTRAINT `cycle_task_group_object_tasks_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `cycle_task_group_object_tasks_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `cycle_task_group_object_tasks_ibfk_3` FOREIGN KEY (`cycle_task_group_object_id`) REFERENCES `cycle_task_group_objects` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cycle_task_group_object_tasks`
--
LOCK TABLES `cycle_task_group_object_tasks` WRITE;
/*!40000 ALTER TABLE `cycle_task_group_object_tasks` DISABLE KEYS */;
/*!40000 ALTER TABLE `cycle_task_group_object_tasks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cycle_task_group_objects`
--
DROP TABLE IF EXISTS `cycle_task_group_objects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cycle_task_group_objects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cycle_task_group_id` int(11) NOT NULL,
`task_group_object_id` int(11) NOT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`cycle_id` int(11) NOT NULL,
`object_id` int(11) NOT NULL,
`object_type` varchar(250) NOT NULL,
`next_due_date` date DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `task_group_object_id` (`task_group_object_id`),
KEY `fk_cycle_task_group_objects_contact` (`contact_id`),
KEY `fk_cycle_task_group_objects_contexts` (`context_id`),
KEY `ix_cycle_task_group_objects_updated_at` (`updated_at`),
KEY `fk_cycle_task_group_objects_secondary_contact` (`secondary_contact_id`),
KEY `cycle_task_group_objects_cycle` (`cycle_id`),
KEY `cycle_task_group_objects_ibfk_3` (`cycle_task_group_id`),
CONSTRAINT `cycle_task_group_objects_cycle` FOREIGN KEY (`cycle_id`) REFERENCES `cycles` (`id`) ON DELETE CASCADE,
CONSTRAINT `cycle_task_group_objects_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `cycle_task_group_objects_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `cycle_task_group_objects_ibfk_3` FOREIGN KEY (`cycle_task_group_id`) REFERENCES `cycle_task_groups` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cycle_task_group_objects`
--
LOCK TABLES `cycle_task_group_objects` WRITE;
/*!40000 ALTER TABLE `cycle_task_group_objects` DISABLE KEYS */;
/*!40000 ALTER TABLE `cycle_task_group_objects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cycle_task_groups`
--
DROP TABLE IF EXISTS `cycle_task_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cycle_task_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cycle_id` int(11) NOT NULL,
`task_group_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`sort_index` varchar(250) NOT NULL,
`next_due_date` date DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`slug` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_slug` (`slug`),
KEY `task_group_id` (`task_group_id`),
KEY `fk_cycle_task_groups_contact` (`contact_id`),
KEY `fk_cycle_task_groups_contexts` (`context_id`),
KEY `ix_cycle_task_groups_updated_at` (`updated_at`),
KEY `fk_cycle_task_groups_secondary_contact` (`secondary_contact_id`),
KEY `cycle_task_groups_ibfk_3` (`cycle_id`),
CONSTRAINT `cycle_task_groups_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `cycle_task_groups_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `cycle_task_groups_ibfk_3` FOREIGN KEY (`cycle_id`) REFERENCES `cycles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cycle_task_groups`
--
LOCK TABLES `cycle_task_groups` WRITE;
/*!40000 ALTER TABLE `cycle_task_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `cycle_task_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cycles`
--
DROP TABLE IF EXISTS `cycles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cycles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workflow_id` int(11) NOT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`is_current` tinyint(1) NOT NULL,
`next_due_date` date DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_cycles` (`slug`),
KEY `fk_cycles_contact` (`contact_id`),
KEY `fk_cycles_contexts` (`context_id`),
KEY `ix_cycles_updated_at` (`updated_at`),
KEY `fk_cycles_secondary_contact` (`secondary_contact_id`),
KEY `cycles_ibfk_3` (`workflow_id`),
CONSTRAINT `cycles_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `cycles_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `cycles_ibfk_3` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cycles`
--
LOCK TABLES `cycles` WRITE;
/*!40000 ALTER TABLE `cycles` DISABLE KEYS */;
/*!40000 ALTER TABLE `cycles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `data_assets`
--
DROP TABLE IF EXISTS `data_assets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `data_assets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_data_assets` (`slug`),
UNIQUE KEY `uq_t_data_assets` (`title`),
KEY `fk_data_assets_contexts` (`context_id`),
KEY `fk_data_assets_contact` (`contact_id`),
KEY `ix_data_assets_updated_at` (`updated_at`),
KEY `fk_data_assets_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_data_assets_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `data_assets`
--
LOCK TABLES `data_assets` WRITE;
/*!40000 ALTER TABLE `data_assets` DISABLE KEYS */;
/*!40000 ALTER TABLE `data_assets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `directives`
--
DROP TABLE IF EXISTS `directives`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `directives` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`version` varchar(250) DEFAULT NULL,
`organization` varchar(250) DEFAULT NULL,
`scope` text,
`kind_id` int(11) DEFAULT NULL,
`audit_start_date` datetime DEFAULT NULL,
`audit_frequency_id` int(11) DEFAULT NULL,
`audit_duration_id` int(11) DEFAULT NULL,
`kind` varchar(250) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`meta_kind` varchar(250) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_directives` (`slug`),
UNIQUE KEY `uq_t_directives` (`title`),
KEY `fk_directives_contexts` (`context_id`),
KEY `fk_directives_contact` (`contact_id`),
KEY `ix_directives_meta_kind` (`meta_kind`),
KEY `ix_directives_updated_at` (`updated_at`),
KEY `fk_directives_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_directives_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `directives`
--
LOCK TABLES `directives` WRITE;
/*!40000 ALTER TABLE `directives` DISABLE KEYS */;
/*!40000 ALTER TABLE `directives` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `documents`
--
DROP TABLE IF EXISTS `documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `documents` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`title` varchar(250) DEFAULT NULL,
`link` varchar(250) DEFAULT NULL,
`description` text,
`kind_id` int(11) DEFAULT NULL,
`year_id` int(11) DEFAULT NULL,
`language_id` int(11) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_documents_contexts` (`context_id`),
KEY `ix_documents_updated_at` (`updated_at`),
CONSTRAINT `fk_documents_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `documents`
--
LOCK TABLES `documents` WRITE;
/*!40000 ALTER TABLE `documents` DISABLE KEYS */;
INSERT INTO `documents` VALUES (1,1,'2016-08-05 15:51:20','2016-08-05 15:51:20','IMG_9243.JPG','https://drive.google.com/a/reciprocitylabs.com/file/d/0Bwbln5IgPB1TZWNQQWNpU0Z2ZUk/view?usp=drivesdk',NULL,NULL,NULL,NULL,5);
/*!40000 ALTER TABLE `documents` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `events`
--
DROP TABLE IF EXISTS `events`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `events` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`action` enum('POST','PUT','DELETE','IMPORT','GET') NOT NULL,
`resource_id` int(11) DEFAULT NULL,
`resource_type` varchar(250) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `events_modified_by` (`modified_by_id`),
KEY `fk_events_contexts` (`context_id`),
KEY `ix_events_updated_at` (`updated_at`),
CONSTRAINT `events_modified_by` FOREIGN KEY (`modified_by_id`) REFERENCES `people` (`id`),
CONSTRAINT `fk_events_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `events`
--
LOCK TABLES `events` WRITE;
/*!40000 ALTER TABLE `events` DISABLE KEYS */;
INSERT INTO `events` VALUES (1,1,'2016-08-05 15:48:35','GET',1,'Person',NULL,'2016-08-05 15:48:35'),(2,1,'2016-08-05 15:48:44','POST',1,'Program',4,'2016-08-05 15:48:44'),(3,1,'2016-08-05 15:48:50','POST',1,'Audit',5,'2016-08-05 15:48:50'),(4,1,'2016-08-05 15:49:07','POST',1,'Control',NULL,'2016-08-05 15:49:07'),(5,1,'2016-08-05 15:49:07','POST',1,'ObjectOwner',NULL,'2016-08-05 15:49:07'),(6,1,'2016-08-05 15:49:43','POST',1,'AssessmentTemplate',5,'2016-08-05 15:49:43'),(7,1,'2016-08-05 15:49:55','POST',1,'Assessment',5,'2016-08-05 15:49:55'),(8,1,'2016-08-05 15:50:24','PUT',1,'Assessment',5,'2016-08-05 15:50:24'),(9,1,'2016-08-05 15:51:20','POST',1,'Document',5,'2016-08-05 15:51:20'),(10,1,'2016-08-05 15:51:21','POST',1,'ObjectDocument',5,'2016-08-05 15:51:21'),(11,1,'2016-08-05 15:51:21','POST',1,'ObjectFile',5,'2016-08-05 15:51:21'),(12,1,'2016-08-05 15:51:23','POST',1,'Comment',5,'2016-08-05 15:51:23'),(13,1,'2016-08-05 15:51:23','POST',6,'Relationship',5,'2016-08-05 15:51:23'),(14,1,'2016-08-05 15:56:20','PUT',1,'Assessment',5,'2016-08-05 15:56:20'),(15,1,'2016-08-05 15:56:25','POST',2,'Comment',5,'2016-08-05 15:56:25'),(16,1,'2016-08-05 15:56:25','POST',7,'Relationship',5,'2016-08-05 15:56:25'),(17,1,'2016-08-05 15:56:36','PUT',1,'Assessment',5,'2016-08-05 15:56:36'),(18,1,'2016-08-05 16:00:15','PUT',1,'Assessment',5,'2016-08-05 16:00:15'),(19,1,'2016-08-05 16:00:22','PUT',1,'Assessment',5,'2016-08-05 16:00:22'),(20,1,'2016-08-05 16:00:29','POST',3,'Comment',5,'2016-08-05 16:00:29'),(21,1,'2016-08-05 16:00:29','POST',8,'Relationship',5,'2016-08-05 16:00:29');
/*!40000 ALTER TABLE `events` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `facilities`
--
DROP TABLE IF EXISTS `facilities`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `facilities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_facilities` (`slug`),
UNIQUE KEY `uq_t_facilities` (`title`),
KEY `fk_facilities_contexts` (`context_id`),
KEY `fk_facilities_contact` (`contact_id`),
KEY `ix_facilities_updated_at` (`updated_at`),
KEY `fk_facilities_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_facilities_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `facilities`
--
LOCK TABLES `facilities` WRITE;
/*!40000 ALTER TABLE `facilities` DISABLE KEYS */;
/*!40000 ALTER TABLE `facilities` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `fulltext_record_properties`
--
DROP TABLE IF EXISTS `fulltext_record_properties`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fulltext_record_properties` (
`key` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(64) NOT NULL,
`tags` varchar(250) DEFAULT NULL,
`property` varchar(64) NOT NULL,
`content` text,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`key`,`type`,`property`),
KEY `ix_fulltext_record_properties_context_id` (`context_id`),
KEY `ix_fulltext_record_properties_key` (`key`),
KEY `ix_fulltext_record_properties_tags` (`tags`),
KEY `ix_fulltext_record_properties_type` (`type`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `fulltext_record_properties`
--
LOCK TABLES `fulltext_record_properties` WRITE;
/*!40000 ALTER TABLE `fulltext_record_properties` DISABLE KEYS */;
INSERT INTO `fulltext_record_properties` VALUES (1,'Assessment','','attribute_value_5','d',NULL),(1,'Assessment','','description',NULL,5),(1,'Assessment','','notes',NULL,5),(1,'Assessment','','slug','ASSESSMENT-1',5),(1,'Assessment','','test_plan','uoaeuoaeuoe',5),(1,'Assessment','','title','oauoa assessment for 2016: oauo - Audit 1',5),(1,'AssessmentTemplate','','slug','TEMPLATE-1',5),(1,'AssessmentTemplate','','title','aaa',5),(1,'Audit','','description','',5),(1,'Audit','','notes',NULL,5),(1,'Audit','','slug','AUDIT-1',5),(1,'Audit','','title','2016: oauo - Audit 1',5),(1,'Comment','','description','auoeuo',5),(1,'Control','','description','oeuoeoae',NULL),(1,'Control','','notes','',NULL),(1,'Control','','slug','CONTROL-1',NULL),(1,'Control','','test_plan','uoaeuoaeuoe',NULL),(1,'Control','','title','oauoa',NULL),(1,'CustomAttributeDefinition','','title','aa',NULL),(1,'Document','','description',NULL,5),(1,'Document','','link','https://drive.google.com/a/reciprocitylabs.com/file/d/0Bwbln5IgPB1TZWNQQWNpU0Z2ZUk/view?usp=drivesdk',5),(1,'Document','','title','IMG_9243.JPG',5),(1,'Person','','company',NULL,NULL),(1,'Person','','email','user@example.com',NULL),(1,'Person','','name','Example User',NULL),(1,'Program','','description','',4),(1,'Program','','notes','',4),(1,'Program','','slug','PROGRAM-1',4),(1,'Program','','title','oauo',4),(2,'Comment','','description','aoeuaouoa',5),(3,'Comment','','description','uoaeuoeuao',5);
/*!40000 ALTER TABLE `fulltext_record_properties` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ggrc_alembic_version`
--
DROP TABLE IF EXISTS `ggrc_alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ggrc_alembic_version` (
`version_num` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ggrc_alembic_version`
--
LOCK TABLES `ggrc_alembic_version` WRITE;
/*!40000 ALTER TABLE `ggrc_alembic_version` DISABLE KEYS */;
INSERT INTO `ggrc_alembic_version` VALUES ('24296c08e78'),('24296c08e78');
/*!40000 ALTER TABLE `ggrc_alembic_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ggrc_basic_permissions_alembic_version`
--
DROP TABLE IF EXISTS `ggrc_basic_permissions_alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ggrc_basic_permissions_alembic_version` (
`version_num` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ggrc_basic_permissions_alembic_version`
--
LOCK TABLES `ggrc_basic_permissions_alembic_version` WRITE;
/*!40000 ALTER TABLE `ggrc_basic_permissions_alembic_version` DISABLE KEYS */;
INSERT INTO `ggrc_basic_permissions_alembic_version` VALUES ('4e105fc39b25');
/*!40000 ALTER TABLE `ggrc_basic_permissions_alembic_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ggrc_gdrive_integration_alembic_version`
--
DROP TABLE IF EXISTS `ggrc_gdrive_integration_alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ggrc_gdrive_integration_alembic_version` (
`version_num` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ggrc_gdrive_integration_alembic_version`
--
LOCK TABLES `ggrc_gdrive_integration_alembic_version` WRITE;
/*!40000 ALTER TABLE `ggrc_gdrive_integration_alembic_version` DISABLE KEYS */;
INSERT INTO `ggrc_gdrive_integration_alembic_version` VALUES ('395186a2d8');
/*!40000 ALTER TABLE `ggrc_gdrive_integration_alembic_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ggrc_risk_assessments_alembic_version`
--
DROP TABLE IF EXISTS `ggrc_risk_assessments_alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ggrc_risk_assessments_alembic_version` (
`version_num` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ggrc_risk_assessments_alembic_version`
--
LOCK TABLES `ggrc_risk_assessments_alembic_version` WRITE;
/*!40000 ALTER TABLE `ggrc_risk_assessments_alembic_version` DISABLE KEYS */;
INSERT INTO `ggrc_risk_assessments_alembic_version` VALUES ('4d4b04a5b9c6');
/*!40000 ALTER TABLE `ggrc_risk_assessments_alembic_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ggrc_risks_alembic_version`
--
DROP TABLE IF EXISTS `ggrc_risks_alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ggrc_risks_alembic_version` (
`version_num` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ggrc_risks_alembic_version`
--
LOCK TABLES `ggrc_risks_alembic_version` WRITE;
/*!40000 ALTER TABLE `ggrc_risks_alembic_version` DISABLE KEYS */;
INSERT INTO `ggrc_risks_alembic_version` VALUES ('3d2acc8a4425');
/*!40000 ALTER TABLE `ggrc_risks_alembic_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ggrc_workflows_alembic_version`
--
DROP TABLE IF EXISTS `ggrc_workflows_alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ggrc_workflows_alembic_version` (
`version_num` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ggrc_workflows_alembic_version`
--
LOCK TABLES `ggrc_workflows_alembic_version` WRITE;
/*!40000 ALTER TABLE `ggrc_workflows_alembic_version` DISABLE KEYS */;
INSERT INTO `ggrc_workflows_alembic_version` VALUES ('4cb78ab9a321');
/*!40000 ALTER TABLE `ggrc_workflows_alembic_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `helps`
--
DROP TABLE IF EXISTS `helps`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `helps` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`content` text,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_helps` (`slug`),
KEY `fk_helps_contexts` (`context_id`),
KEY `ix_helps_updated_at` (`updated_at`),
CONSTRAINT `fk_helps_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `helps`
--
LOCK TABLES `helps` WRITE;
/*!40000 ALTER TABLE `helps` DISABLE KEYS */;
/*!40000 ALTER TABLE `helps` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `issues`
--
DROP TABLE IF EXISTS `issues`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `issues` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`os_state` varchar(250) NOT NULL,
`test_plan` text,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`notes` text,
`description` text,
`url` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_issues` (`slug`),
UNIQUE KEY `uq_t_issues` (`title`),
KEY `contact_id` (`contact_id`),
KEY `context_id` (`context_id`),
KEY `secondary_contact_id` (`secondary_contact_id`),
CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `issues_ibfk_3` FOREIGN KEY (`secondary_contact_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `issues`
--
LOCK TABLES `issues` WRITE;
/*!40000 ALTER TABLE `issues` DISABLE KEYS */;
/*!40000 ALTER TABLE `issues` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `markets`
--
DROP TABLE IF EXISTS `markets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `markets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_markets` (`slug`),
UNIQUE KEY `uq_t_markets` (`title`),
KEY `fk_markets_contexts` (`context_id`),
KEY `fk_markets_contact` (`contact_id`),
KEY `ix_markets_updated_at` (`updated_at`),
KEY `fk_markets_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_markets_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `markets`
--
LOCK TABLES `markets` WRITE;
/*!40000 ALTER TABLE `markets` DISABLE KEYS */;
/*!40000 ALTER TABLE `markets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `meetings`
--
DROP TABLE IF EXISTS `meetings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `meetings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`description` text,
`start_at` datetime NOT NULL,
`end_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_meetings_contexts` (`context_id`),
KEY `ix_meetings_updated_at` (`updated_at`),
CONSTRAINT `meetings_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `meetings`
--
LOCK TABLES `meetings` WRITE;
/*!40000 ALTER TABLE `meetings` DISABLE KEYS */;
/*!40000 ALTER TABLE `meetings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `notification_configs`
--
DROP TABLE IF EXISTS `notification_configs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notification_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`enable_flag` tinyint(1) DEFAULT NULL,
`notif_type` varchar(250) DEFAULT NULL,
`person_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_notif_configs_person_id_notif_type` (`person_id`,`notif_type`),
KEY `fk_notification_configs_contexts` (`context_id`),
KEY `ix_notification_configs_updated_at` (`updated_at`),
CONSTRAINT `notification_configs_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `notification_configs_ibfk_2` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `notification_configs`
--
LOCK TABLES `notification_configs` WRITE;
/*!40000 ALTER TABLE `notification_configs` DISABLE KEYS */;
/*!40000 ALTER TABLE `notification_configs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `notification_types`
--
DROP TABLE IF EXISTS `notification_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notification_types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) NOT NULL,
`description` varchar(250) DEFAULT NULL,
`advance_notice` int(11) DEFAULT NULL,
`template` varchar(250) NOT NULL,
`instant` tinyint(1) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `modified_by_id` (`modified_by_id`),
CONSTRAINT `notification_types_ibfk_1` FOREIGN KEY (`modified_by_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `notification_types`
--
LOCK TABLES `notification_types` WRITE;
/*!40000 ALTER TABLE `notification_types` DISABLE KEYS */;
INSERT INTO `notification_types` VALUES (1,'request_open','Notify all assignees Requesters Assignees and Verifiers that a new request has been created.',0,'request_open',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(2,'request_declined','Notify Requester that a request has been declined.',0,'request_declined',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(3,'request_manual','Send a manual notification to the Requester.',0,'request_manual',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(4,'assessment_open','Send an open assessment notification to Assessors, Assignees and Verifiers.',0,'assessment_open',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(5,'assessment_declined','Notify Assessor that an assessment was declined.',0,'assessment_declined',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(6,'assessment_manual','Send a manual notification to the Requester.',0,'assessment_manual',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(7,'assessment_assessor_reminder','Notify all Assessors that they should take a look at the assessment.',0,'',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(8,'comment_created','Notify selected users that a comment has been created',0,'comment_created',0,'2016-08-05 15:48:26',NULL,'2016-08-05 15:48:26',NULL),(9,'cycle_created','Notify workflow members that a one time workflow has been started and send them their assigned tasks.',0,'cycle_created',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(10,'manual_cycle_created','Notify workflow members that a one time workflow has been started and send them their assigned tasks.',0,'manual_cycle_created',1,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(11,'cycle_task_due_in','Notify task assignee his task is due in X days',1,'cycle_task_due_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(12,'one_time_cycle_task_due_in','Notify task assignee his task is due in X days',1,'cycle_task_due_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(13,'weekly_cycle_task_due_in','Notify task assignee his task is due in X days',1,'cycle_task_due_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(14,'monthly_cycle_task_due_in','Notify task assignee his task is due in X days',1,'cycle_task_due_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(15,'quarterly_cycle_task_due_in','Notify task assignee his task is due in X days',1,'cycle_task_due_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(16,'annually_cycle_task_due_in','Notify task assignee his task is due in X days',1,'cycle_task_due_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(17,'cycle_task_due_today','Notify task assignee his task is due today',0,'cycle_task_due_today',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(18,'cycle_task_reassigned','Notify task assignee his task is due today',0,'cycle_task_due_today',1,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(19,'task_group_assignee_change','Email owners on task group assignee change.',0,'task_group_assignee_change',1,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(20,'cycle_task_declined','Notify task assignee his task is due today',0,'cycle_task_due_today',1,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(21,'all_cycle_tasks_completed','Notify workflow owner when all cycle tasks in one cycle have been completed and verified',1,'weekly_workflow_starts_in',1,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(22,'weekly_workflow_starts_in','Advanced notification for a recurring workflow.',1,'weekly_workflow_starts_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(23,'monthly_workflow_starts_in','Advanced notification for a recurring workflow.',3,'monthly_workflow_starts_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(24,'quarterly_workflow_starts_in','Advanced notification for a recurring workflow.',7,'quaterly_workflow_starts_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(25,'annually_workflow_starts_in','Advanced notification for a recurring workflow.',15,'annual_workflow_starts_in',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL),(26,'cycle_start_failed','Notify workflow owners that a cycle has failed tostart for a recurring workflow',0,'cycle_start_failed',0,'2016-08-05 15:48:28',NULL,'2016-08-05 15:48:28',NULL);
/*!40000 ALTER TABLE `notification_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `notifications`
--
DROP TABLE IF EXISTS `notifications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notifications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`object_id` int(11) NOT NULL,
`object_type` varchar(250) NOT NULL,
`notification_type_id` int(11) NOT NULL,
`send_on` datetime NOT NULL,
`sent_at` datetime DEFAULT NULL,
`custom_message` text,
`force_notifications` tinyint(1) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `modified_by_id` (`modified_by_id`),
KEY `fk_notification_type_id` (`notification_type_id`),
CONSTRAINT `notifications_ibfk_2` FOREIGN KEY (`notification_type_id`) REFERENCES `notification_types` (`id`),
CONSTRAINT `notifications_ibfk_3` FOREIGN KEY (`modified_by_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `notifications`
--
LOCK TABLES `notifications` WRITE;
/*!40000 ALTER TABLE `notifications` DISABLE KEYS */;
INSERT INTO `notifications` VALUES (1,1,'Assessment',4,'2016-08-05 00:00:00',NULL,NULL,0,'2016-08-05 15:49:55',NULL,'2016-08-05 15:49:55',NULL);
/*!40000 ALTER TABLE `notifications` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `object_documents`
--
DROP TABLE IF EXISTS `object_documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `object_documents` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`role` varchar(250) DEFAULT NULL,
`notes` text,
`document_id` int(11) NOT NULL,
`documentable_id` int(11) NOT NULL,
`documentable_type` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_object_documents` (`document_id`,`documentable_id`,`documentable_type`),
KEY `fk_object_documents_contexts` (`context_id`),
KEY `ix_document_id` (`document_id`),
KEY `ix_object_documents_updated_at` (`updated_at`),
CONSTRAINT `fk_object_documents_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `object_documents_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `documents` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `object_documents`
--
LOCK TABLES `object_documents` WRITE;
/*!40000 ALTER TABLE `object_documents` DISABLE KEYS */;
INSERT INTO `object_documents` VALUES (1,1,'2016-08-05 15:51:21','2016-08-05 15:51:21',NULL,NULL,NULL,NULL,1,1,'Assessment',5,'Draft');
/*!40000 ALTER TABLE `object_documents` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `object_events`
--
DROP TABLE IF EXISTS `object_events`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `object_events` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`calendar_id` varchar(250) DEFAULT NULL,
`event_id` varchar(250) NOT NULL,
`eventable_id` int(11) NOT NULL,
`eventable_type` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_object_events_contexts` (`context_id`),
KEY `ix_object_events_updated_at` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `object_events`
--
LOCK TABLES `object_events` WRITE;
/*!40000 ALTER TABLE `object_events` DISABLE KEYS */;
/*!40000 ALTER TABLE `object_events` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `object_files`
--
DROP TABLE IF EXISTS `object_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `object_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`parent_folder_id` varchar(250) DEFAULT NULL,
`file_id` varchar(250) NOT NULL,
`fileable_id` int(11) NOT NULL,
`fileable_type` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_object_files_contexts` (`context_id`),
KEY `ix_object_files_updated_at` (`updated_at`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `object_files`
--
LOCK TABLES `object_files` WRITE;
/*!40000 ALTER TABLE `object_files` DISABLE KEYS */;
INSERT INTO `object_files` VALUES (1,1,'2016-08-05 15:51:21','2016-08-05 15:51:21',5,NULL,'0Bwbln5IgPB1TZWNQQWNpU0Z2ZUk',1,'Document');
/*!40000 ALTER TABLE `object_files` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `object_folders`
--
DROP TABLE IF EXISTS `object_folders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `object_folders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`parent_folder_id` varchar(250) DEFAULT NULL,
`folder_id` varchar(250) NOT NULL,
`folderable_id` int(11) NOT NULL,
`folderable_type` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_object_folders_contexts` (`context_id`),
KEY `ix_folderable_id_type` (`folderable_type`,`folderable_id`),
KEY `ix_object_folders_updated_at` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `object_folders`
--
LOCK TABLES `object_folders` WRITE;
/*!40000 ALTER TABLE `object_folders` DISABLE KEYS */;
/*!40000 ALTER TABLE `object_folders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `object_owners`
--
DROP TABLE IF EXISTS `object_owners`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `object_owners` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL,
`ownable_id` int(11) NOT NULL,
`ownable_type` varchar(250) NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_id_owners` (`person_id`,`ownable_id`,`ownable_type`),
KEY `fk_object_owners_contexts` (`context_id`),
KEY `ix_object_owners_ownable` (`ownable_type`,`ownable_id`),
KEY `ix_object_owners_updated_at` (`updated_at`),
CONSTRAINT `object_owners_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`),
CONSTRAINT `object_owners_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `object_owners`
--
LOCK TABLES `object_owners` WRITE;
/*!40000 ALTER TABLE `object_owners` DISABLE KEYS */;
INSERT INTO `object_owners` VALUES (1,1,1,'Control',1,'2016-08-05 15:49:07','2016-08-05 15:49:07',NULL,'Draft'),(2,1,1,'Comment',NULL,'2016-08-05 15:51:23','2016-08-05 15:51:23',NULL,'Draft'),(3,1,2,'Comment',NULL,'2016-08-05 15:56:25','2016-08-05 15:56:25',NULL,'Draft'),(4,1,3,'Comment',NULL,'2016-08-05 16:00:29','2016-08-05 16:00:29',NULL,'Draft');
/*!40000 ALTER TABLE `object_owners` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `object_people`
--
DROP TABLE IF EXISTS `object_people`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `object_people` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`role` varchar(250) DEFAULT NULL,
`notes` text,
`person_id` int(11) NOT NULL,
`personable_id` int(11) NOT NULL,
`personable_type` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_object_people` (`person_id`,`personable_id`,`personable_type`),
KEY `fk_object_people_contexts` (`context_id`),
KEY `ix_person_id` (`person_id`),
KEY `ix_object_people_updated_at` (`updated_at`),
CONSTRAINT `fk_object_people_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `object_people_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `object_people`
--
LOCK TABLES `object_people` WRITE;
/*!40000 ALTER TABLE `object_people` DISABLE KEYS */;
/*!40000 ALTER TABLE `object_people` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `objectives`
--
DROP TABLE IF EXISTS `objectives`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `objectives` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`notes` text,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_objectives` (`slug`),
UNIQUE KEY `uq_t_objectives` (`title`),
KEY `fk_objectives_contact` (`contact_id`),
KEY `fk_objectives_contexts` (`context_id`),
KEY `ix_objectives_updated_at` (`updated_at`),
KEY `fk_objectives_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `objectives_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `objectives`
--
LOCK TABLES `objectives` WRITE;
/*!40000 ALTER TABLE `objectives` DISABLE KEYS */;
/*!40000 ALTER TABLE `objectives` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `options`
--
DROP TABLE IF EXISTS `options`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `options` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`role` varchar(250) DEFAULT NULL,
`title` varchar(250) DEFAULT NULL,
`required` tinyint(1) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_options_contexts` (`context_id`),
KEY `ix_options_role` (`role`),
KEY `ix_options_updated_at` (`updated_at`),
CONSTRAINT `fk_options_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `options`
--
LOCK TABLES `options` WRITE;
/*!40000 ALTER TABLE `options` DISABLE KEYS */;
INSERT INTO `options` VALUES (1,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','Client List',NULL,NULL),(2,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','Employee List',NULL,NULL),(3,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','Ledger Accounts',NULL,NULL),(4,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','Patents',NULL,NULL),(5,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','Personal Identifiable Info',NULL,NULL),(6,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','Source Code',NULL,NULL),(7,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'asset_type','User Data',NULL,NULL),(8,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','1 Month',NULL,NULL),(9,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','1 Week',NULL,NULL),(10,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','1 Year',NULL,NULL),(11,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','2 Months',NULL,NULL),(12,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','2 Weeks',NULL,NULL),(13,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','3 Months',NULL,NULL),(14,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','4 Months',NULL,NULL),(15,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_duration','6 Months',NULL,NULL),(16,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Ad-Hoc',NULL,NULL),(17,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Annual',NULL,NULL),(18,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Bi-Annual',NULL,NULL),(19,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Continuous',NULL,NULL),(20,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Daily',NULL,NULL),(21,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Hourly',NULL,NULL),(22,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Monthly',NULL,NULL),(23,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Quarterly',NULL,NULL),(24,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Semi-Annual',NULL,NULL),(25,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'audit_frequency','Weekly',NULL,NULL),(27,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'control_kind','Detective',NULL,NULL),(28,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'control_kind','Preventative',NULL,NULL),(38,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'directive_kind','Company Policy',NULL,NULL),(39,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'directive_kind','Data Asset Policy',NULL,NULL),(40,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'directive_kind','Operational Group Policy',NULL,NULL),(41,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'directive_kind','Regulation',NULL,NULL),(42,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_status','active',NULL,NULL),(43,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_status','deprecated',NULL,NULL),(44,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_type','Excel',NULL,NULL),(45,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_type','PDF',NULL,NULL),(46,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_type','Text',NULL,NULL),(47,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_type','URL',NULL,NULL),(48,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_type','Word',NULL,NULL),(49,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1980',NULL,NULL),(50,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1981',NULL,NULL),(51,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1982',NULL,NULL),(52,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1983',NULL,NULL),(53,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1984',NULL,NULL),(54,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1985',NULL,NULL),(55,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1986',NULL,NULL),(56,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1987',NULL,NULL),(57,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1988',NULL,NULL),(58,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1989',NULL,NULL),(59,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1990',NULL,NULL),(60,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1991',NULL,NULL),(61,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1992',NULL,NULL),(62,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1993',NULL,NULL),(63,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1994',NULL,NULL),(64,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1995',NULL,NULL),(65,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1996',NULL,NULL),(66,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1997',NULL,NULL),(67,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1998',NULL,NULL),(68,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','1999',NULL,NULL),(69,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2000',NULL,NULL),(70,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2001',NULL,NULL),(71,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2002',NULL,NULL),(72,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2003',NULL,NULL),(73,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2004',NULL,NULL),(74,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2005',NULL,NULL),(75,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2006',NULL,NULL),(76,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2007',NULL,NULL),(77,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2008',NULL,NULL),(78,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2009',NULL,NULL),(79,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2010',NULL,NULL),(80,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2011',NULL,NULL),(81,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2012',NULL,NULL),(82,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'document_year','2013',0,NULL),(83,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'entity_kind','Not Applicable',NULL,NULL),(84,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'entity_type','Business Unit',NULL,NULL),(85,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'entity_type','Division',NULL,NULL),(86,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'entity_type','Functional Group',NULL,NULL),(87,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'entity_type','Legal Entity',NULL,NULL),(88,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'language','English',NULL,NULL),(89,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Building',NULL,NULL),(90,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','HazMat Storage',NULL,NULL),(91,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Kitchen',NULL,NULL),(92,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Lab',NULL,NULL),(93,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Machine Room',NULL,NULL),(94,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Maintenance Facility',NULL,NULL),(95,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Office',NULL,NULL),(96,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Parking Garage',NULL,NULL),(97,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_kind','Workshop',NULL,NULL),(98,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Colo Data Center',NULL,NULL),(99,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Contract Manufacturer',NULL,NULL),(100,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Data Center',NULL,NULL),(101,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Distribution Center',NULL,NULL),(102,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Headquarters',NULL,NULL),(103,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Regional Office',NULL,NULL),(104,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Sales Office',NULL,NULL),(105,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'location_type','Vendor Worksite',NULL,NULL),(106,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'network_zone','Corp',0,NULL),(107,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'network_zone','Prod',0,NULL),(108,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'person_language','English',NULL,NULL),(109,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'product_kind','Not Applicable',NULL,NULL),(110,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'product_type','Appliance',NULL,NULL),(111,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'product_type','Desktop Software',NULL,NULL),(112,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'product_type','SaaS',NULL,NULL),(113,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'reference_type','Database',NULL,NULL),(114,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'reference_type','Document',NULL,NULL),(115,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'reference_type','Numeric Data',NULL,NULL),(116,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'reference_type','Screenshot',NULL,NULL),(117,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'reference_type','Simple Text',NULL,NULL),(118,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'reference_type','Website',NULL,NULL),(119,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'system_kind','Infrastructure',NULL,NULL),(120,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'system_type','Infrastructure',NULL,NULL),(121,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'threat_type','Insider Threat',NULL,NULL),(122,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'threat_type','Outsider Threat',NULL,NULL),(123,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Bi-Weekly',NULL,NULL),(124,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Yearly',NULL,NULL),(125,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Bi-Monthly',NULL,NULL),(126,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Continuous',NULL,NULL),(127,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Daily',NULL,NULL),(128,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Hourly',NULL,NULL),(129,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Indeterminate',0,NULL),(130,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Monthly',NULL,NULL),(131,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Quarterly',NULL,NULL),(132,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Semi-Annually',NULL,NULL),(133,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Transactional',0,NULL),(134,NULL,'2016-05-03 10:37:02','2016-05-03 10:37:02',NULL,'verify_frequency','Weekly',NULL,NULL),(135,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'network_zone','3rd Party',NULL,NULL),(136,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'network_zone','Core',NULL,NULL),(137,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'network_zone','Service',NULL,NULL),(138,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'control_kind','Corrective',NULL,NULL),(139,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'control_means','Technical',NULL,NULL),(140,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'control_means','Administrative',NULL,NULL),(141,NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'control_means','Physical',NULL,NULL);
/*!40000 ALTER TABLE `options` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `org_groups`
--
DROP TABLE IF EXISTS `org_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `org_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_org_groups` (`slug`),
UNIQUE KEY `uq_t_org_groups` (`title`),
KEY `fk_org_groups_contexts` (`context_id`),
KEY `fk_org_groups_contact` (`contact_id`),
KEY `ix_org_groups_updated_at` (`updated_at`),
KEY `fk_org_groups_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_org_groups_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `org_groups`
--
LOCK TABLES `org_groups` WRITE;
/*!40000 ALTER TABLE `org_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `org_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `people`
--
DROP TABLE IF EXISTS `people`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `people` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`email` varchar(250) NOT NULL,
`name` varchar(250) DEFAULT NULL,
`language_id` int(11) DEFAULT NULL,
`company` varchar(250) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_people_email` (`email`),
KEY `fk_people_contexts` (`context_id`),
KEY `ix_people_name_email` (`name`,`email`),
KEY `ix_people_updated_at` (`updated_at`),
CONSTRAINT `fk_people_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `people`
--
LOCK TABLES `people` WRITE;
/*!40000 ALTER TABLE `people` DISABLE KEYS */;
INSERT INTO `people` VALUES (1,NULL,'2016-08-05 15:48:35','2016-08-05 15:48:35','user@example.com','Example User',NULL,NULL,NULL);
/*!40000 ALTER TABLE `people` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `products`
--
DROP TABLE IF EXISTS `products`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`kind_id` int(11) DEFAULT NULL,
`version` varchar(250) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_products` (`slug`),
UNIQUE KEY `uq_t_products` (`title`),
KEY `fk_products_contexts` (`context_id`),
KEY `fk_products_contact` (`contact_id`),
KEY `ix_products_updated_at` (`updated_at`),
KEY `fk_products_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_products_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `products`
--
LOCK TABLES `products` WRITE;
/*!40000 ALTER TABLE `products` DISABLE KEYS */;
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `programs`
--
DROP TABLE IF EXISTS `programs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `programs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`kind` varchar(250) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_programs` (`slug`),
UNIQUE KEY `uq_t_programs` (`title`),
KEY `fk_programs_contexts` (`context_id`),
KEY `fk_programs_contact` (`contact_id`),
KEY `ix_programs_updated_at` (`updated_at`),
KEY `fk_programs_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_programs_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `programs`
--
LOCK TABLES `programs` WRITE;
/*!40000 ALTER TABLE `programs` DISABLE KEYS */;
INSERT INTO `programs` VALUES (1,1,'2016-08-05 15:48:44','2016-08-05 15:48:44','','',NULL,NULL,'PROGRAM-1','oauo','Directive',4,1,'','Draft','',NULL,'Modified');
/*!40000 ALTER TABLE `programs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `projects`
--
DROP TABLE IF EXISTS `projects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_projects` (`slug`),
UNIQUE KEY `uq_t_projects` (`title`),
KEY `fk_projects_contexts` (`context_id`),
KEY `fk_projects_contact` (`contact_id`),
KEY `ix_projects_updated_at` (`updated_at`),
KEY `fk_projects_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_projects_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `projects`
--
LOCK TABLES `projects` WRITE;
/*!40000 ALTER TABLE `projects` DISABLE KEYS */;
/*!40000 ALTER TABLE `projects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `relationship_attrs`
--
DROP TABLE IF EXISTS `relationship_attrs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `relationship_attrs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`relationship_id` int(11) NOT NULL,
`attr_name` varchar(250) NOT NULL,
`attr_value` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
KEY `relationship_id` (`relationship_id`),
CONSTRAINT `relationship_attrs_ibfk_1` FOREIGN KEY (`relationship_id`) REFERENCES `relationships` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `relationship_attrs`
--
LOCK TABLES `relationship_attrs` WRITE;
/*!40000 ALTER TABLE `relationship_attrs` DISABLE KEYS */;
INSERT INTO `relationship_attrs` VALUES (1,5,'AssigneeType','Verifier,Assessor,Creator');
/*!40000 ALTER TABLE `relationship_attrs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `relationships`
--
DROP TABLE IF EXISTS `relationships`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `relationships` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`source_id` int(11) NOT NULL,
`source_type` varchar(250) NOT NULL,
`destination_id` int(11) NOT NULL,
`destination_type` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`automapping_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_relationships` (`source_id`,`source_type`,`destination_id`,`destination_type`),
KEY `fk_relationships_contexts` (`context_id`),
KEY `ix_relationships_destination` (`destination_type`,`destination_id`),
KEY `ix_relationships_source` (`source_type`,`source_id`),
KEY `ix_relationships_updated_at` (`updated_at`),
KEY `relationships_automapping_parent` (`automapping_id`),
CONSTRAINT `fk_relationships_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `relationships_automapping_parent` FOREIGN KEY (`automapping_id`) REFERENCES `relationships` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `relationships`
--
LOCK TABLES `relationships` WRITE;
/*!40000 ALTER TABLE `relationships` DISABLE KEYS */;
INSERT INTO `relationships` VALUES (1,NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43',1,'Audit',1,'AssessmentTemplate',5,'Draft',NULL),(2,NULL,'2016-08-05 15:49:55','2016-08-05 15:49:55',1,'Assessment',1,'Control',5,'Draft',NULL),(3,NULL,'2016-08-05 15:49:55','2016-08-05 15:49:55',1,'Assessment',1,'Audit',5,'Draft',NULL),(4,NULL,'2016-08-05 15:49:55','2016-08-05 15:49:55',1,'Assessment',1,'Program',5,'Draft',NULL),(5,NULL,'2016-08-05 15:49:55','2016-08-05 15:49:55',1,'Person',1,'Assessment',5,'Draft',NULL),(6,1,'2016-08-05 15:51:23','2016-08-05 15:51:23',1,'Assessment',1,'Comment',5,'Draft',NULL),(7,1,'2016-08-05 15:56:25','2016-08-05 16:00:29',1,'Assessment',2,'Comment',5,'Draft',NULL),(8,1,'2016-08-05 16:00:29','2016-08-05 16:00:29',1,'Assessment',3,'Comment',5,'Draft',NULL);
/*!40000 ALTER TABLE `relationships` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `requests`
--
DROP TABLE IF EXISTS `requests`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`request_type` enum('documentation','interview','population sample') NOT NULL,
`status` enum('Not Started','In Progress','Ready for Review','Verified','Completed') NOT NULL,
`start_date` date NOT NULL,
`end_date` date NOT NULL,
`audit_id` int(11) NOT NULL,
`gdrive_upload_path` varchar(250) DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`test` text,
`notes` text,
`description` text,
`requestor_id` int(11) DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`audit_object_id` int(11) DEFAULT NULL,
`finished_date` datetime DEFAULT NULL,
`verified_date` datetime DEFAULT NULL,
`recipients` varchar(250) DEFAULT NULL,
`send_by_default` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_requests` (`slug`),
KEY `audit_id` (`audit_id`),
KEY `fk_requests_contexts` (`context_id`),
KEY `ix_requests_updated_at` (`updated_at`),
KEY `requests_audit_objects_ibfk` (`audit_object_id`),
CONSTRAINT `requests_audit_objects_ibfk` FOREIGN KEY (`audit_object_id`) REFERENCES `audit_objects` (`id`),
CONSTRAINT `requests_ibfk_2` FOREIGN KEY (`audit_id`) REFERENCES `audits` (`id`),
CONSTRAINT `requests_ibfk_3` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `requests`
--
LOCK TABLES `requests` WRITE;
/*!40000 ALTER TABLE `requests` DISABLE KEYS */;
/*!40000 ALTER TABLE `requests` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `revisions`
--
DROP TABLE IF EXISTS `revisions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `revisions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`resource_id` int(11) NOT NULL,
`resource_type` varchar(250) NOT NULL,
`event_id` int(11) NOT NULL,
`action` enum('created','modified','deleted') NOT NULL,
`content` text NOT NULL,
`context_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`source_type` varchar(250) DEFAULT NULL,
`source_id` int(11) DEFAULT NULL,
`destination_type` varchar(250) DEFAULT NULL,
`destination_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `event_id` (`event_id`),
KEY `revisions_modified_by` (`modified_by_id`),
KEY `fk_revisions_contexts` (`context_id`),
KEY `ix_revisions_updated_at` (`updated_at`),
KEY `fk_revisions_resource` (`resource_type`,`resource_id`),
KEY `fk_revisions_source` (`source_type`,`source_id`),
KEY `fk_revisions_destination` (`destination_type`,`destination_id`),
CONSTRAINT `fk_revisions_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `revisions_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`),
CONSTRAINT `revisions_modified_by` FOREIGN KEY (`modified_by_id`) REFERENCES `people` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `revisions`
--
LOCK TABLES `revisions` WRITE;
/*!40000 ALTER TABLE `revisions` DISABLE KEYS */;
INSERT INTO `revisions` VALUES (1,1,'Person',1,'created','{\"display_name\": \"user@example.com\", \"name\": \"Example User\", \"updated_at\": \"2016-08-05T15:48:35\", \"context_id\": null, \"created_at\": \"2016-08-05T15:48:35\", \"language_id\": null, \"custom_attributes\": [], \"id\": 1, \"email\": \"user@example.com\", \"custom_attribute_definitions\": [], \"modified_by_id\": null, \"company\": null}',NULL,'2016-08-05 15:48:35','2016-08-05 15:48:35',1,NULL,NULL,NULL,NULL),(2,3,'Context',2,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:48:44','2016-08-05 15:48:44',1,NULL,NULL,NULL,NULL),(3,1,'UserRole',2,'created','{\"display_name\": \"user@example.com <-> ProgramOwner in oauo\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:44\", \"updated_at\": \"2016-08-05T15:48:44\", \"role_id\": 1, \"modified_by_id\": 1, \"person_id\": 1, \"id\": 1}',NULL,'2016-08-05 15:48:44','2016-08-05 15:48:44',1,NULL,NULL,NULL,NULL),(4,2,'ContextImplication',2,'created','{\"source_context_id\": 4, \"source_context_scope\": \"Program\", \"context_id\": null, \"created_at\": \"2016-08-05T15:48:44\", \"updated_at\": \"2016-08-05T15:48:44\", \"context_scope\": null, \"modified_by_id\": 1, \"display_name\": \"Program Context 2016-08-05 15:48:44.549852 -> Default Context\", \"id\": 2}',NULL,'2016-08-05 15:48:44','2016-08-05 15:48:44',1,NULL,NULL,NULL,NULL),(5,3,'ContextImplication',2,'created','{\"source_context_id\": null, \"source_context_scope\": null, \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:44\", \"updated_at\": \"2016-08-05T15:48:44\", \"context_scope\": \"Program\", \"modified_by_id\": 1, \"display_name\": \"Default Context -> Program Context 2016-08-05 15:48:44.549852\", \"id\": 3}',NULL,'2016-08-05 15:48:44','2016-08-05 15:48:44',1,NULL,NULL,NULL,NULL),(6,1,'Program',2,'created','{\"status\": \"Draft\", \"created_at\": \"2016-08-05T15:48:44\", \"kind\": \"Directive\", \"display_name\": \"oauo\", \"description\": \"\", \"end_date\": null, \"title\": \"oauo\", \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"notes\": \"\", \"updated_at\": \"2016-08-05T15:48:44\", \"contact_id\": 1, \"start_date\": null, \"reference_url\": \"\", \"url\": \"\", \"custom_attribute_definitions\": [], \"custom_attributes\": [], \"modified_by_id\": 1, \"context_id\": 4, \"slug\": \"PROGRAM-1\", \"id\": 1}',NULL,'2016-08-05 15:48:44','2016-08-05 15:48:44',1,NULL,NULL,NULL,NULL),(7,4,'Context',2,'created','{\"display_name\": \"Program Context 2016-08-05 15:48:44.549852\", \"name\": \"Program Context 2016-08-05 15:48:44.549852\", \"context_id\": null, \"created_at\": \"2016-08-05T15:48:44\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Program\", \"modified_by_id\": 1, \"id\": 4, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:48:44','2016-08-05 15:48:44',1,NULL,NULL,NULL,NULL),(8,3,'Context',3,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:48:50','2016-08-05 15:48:50',1,NULL,NULL,NULL,NULL),(9,4,'ContextImplication',3,'created','{\"source_context_id\": 4, \"source_context_scope\": \"Program\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:48:50\", \"updated_at\": \"2016-08-05T15:48:50\", \"context_scope\": \"Audit\", \"modified_by_id\": 1, \"display_name\": \"Program Context 2016-08-05 15:48:44.549852 -> Audit Context 2016-08-05 15:48:50.475367\", \"id\": 4}',NULL,'2016-08-05 15:48:50','2016-08-05 15:48:50',1,NULL,NULL,NULL,NULL),(10,5,'Context',3,'created','{\"display_name\": \"Audit Context 2016-08-05 15:48:50.475367\", \"name\": \"Audit Context 2016-08-05 15:48:50.475367\", \"context_id\": null, \"created_at\": \"2016-08-05T15:48:50\", \"updated_at\": \"2016-08-05T15:48:50\", \"related_object_type\": \"Audit\", \"modified_by_id\": 1, \"id\": 5, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:48:50','2016-08-05 15:48:50',1,NULL,NULL,NULL,NULL),(11,1,'Audit',3,'created','{\"context_id\": 5, \"object_type\": \"Assessment\", \"updated_at\": \"2016-08-05T15:48:50\", \"contact_id\": 1, \"id\": 1, \"display_name\": \"2016: oauo - Audit 1\", \"title\": \"2016: oauo - Audit 1\", \"custom_attributes\": [], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"Draft\", \"gdrive_evidence_folder\": null, \"description\": \"\", \"end_date\": null, \"secondary_contact_id\": null, \"program_id\": 1, \"report_end_date\": null, \"slug\": \"AUDIT-1\", \"url\": null, \"audit_firm_id\": null, \"created_at\": \"2016-08-05T15:48:50\", \"reference_url\": null, \"custom_attribute_definitions\": [], \"notes\": null, \"report_start_date\": null}',NULL,'2016-08-05 15:48:50','2016-08-05 15:48:50',1,NULL,NULL,NULL,NULL),(12,5,'ContextImplication',3,'created','{\"source_context_id\": 5, \"source_context_scope\": \"Audit\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:50\", \"updated_at\": \"2016-08-05T15:48:50\", \"context_scope\": \"Program\", \"modified_by_id\": 1, \"display_name\": \"Audit Context 2016-08-05 15:48:50.475367 -> Program Context 2016-08-05 15:48:44.549852\", \"id\": 5}',NULL,'2016-08-05 15:48:50','2016-08-05 15:48:50',1,NULL,NULL,NULL,NULL),(13,6,'ContextImplication',3,'created','{\"source_context_id\": 5, \"source_context_scope\": \"Audit\", \"context_id\": null, \"created_at\": \"2016-08-05T15:48:50\", \"updated_at\": \"2016-08-05T15:48:50\", \"context_scope\": null, \"modified_by_id\": 1, \"display_name\": \"Audit Context 2016-08-05 15:48:50.475367 -> Default Context\", \"id\": 6}',NULL,'2016-08-05 15:48:50','2016-08-05 15:48:50',1,NULL,NULL,NULL,NULL),(14,3,'Context',4,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(15,2,'Categorization',4,'created','{\"display_name\": \"\", \"context_id\": null, \"created_at\": \"2016-08-05T15:49:07\", \"updated_at\": \"2016-08-05T15:49:07\", \"category_type\": \"ControlAssertion\", \"categorizable_id\": 1, \"modified_by_id\": 1, \"category_id\": 39, \"id\": 2, \"categorizable_type\": \"Control\"}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(16,1,'Categorization',4,'created','{\"display_name\": \"\", \"context_id\": null, \"created_at\": \"2016-08-05T15:49:07\", \"updated_at\": \"2016-08-05T15:49:07\", \"category_type\": \"ControlAssertion\", \"categorizable_id\": 1, \"modified_by_id\": 1, \"category_id\": 40, \"id\": 1, \"categorizable_type\": \"Control\"}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(17,1,'Control',4,'created','{\"company_control\": null, \"principal_assessor_id\": null, \"updated_at\": \"2016-08-05T15:49:07\", \"contact_id\": 1, \"fraud_related\": null, \"id\": 1, \"display_name\": \"oauoa\", \"title\": \"oauoa\", \"kind_id\": null, \"custom_attributes\": [], \"custom_attribute_definitions\": [], \"documentation_description\": null, \"parent_id\": null, \"version\": null, \"directive_id\": null, \"secondary_contact_id\": null, \"context_id\": null, \"start_date\": null, \"status\": \"Draft\", \"description\": \"oeuoeoae\", \"end_date\": null, \"os_state\": \"Modified\", \"secondary_assessor_id\": null, \"means_id\": null, \"modified_by_id\": 1, \"verify_frequency_id\": null, \"active\": null, \"slug\": \"CONTROL-1\", \"url\": \"\", \"notes\": \"\", \"key_control\": null, \"reference_url\": \"\", \"test_plan\": \"uoaeuoaeuoe\", \"created_at\": \"2016-08-05T15:49:07\"}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(18,3,'Categorization',4,'created','{\"display_name\": \"\", \"context_id\": null, \"created_at\": \"2016-08-05T15:49:07\", \"updated_at\": \"2016-08-05T15:49:07\", \"category_type\": \"ControlAssertion\", \"categorizable_id\": 1, \"modified_by_id\": 1, \"category_id\": 41, \"id\": 3, \"categorizable_type\": \"Control\"}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(19,3,'Context',5,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(20,1,'ObjectOwner',5,'created','{\"status\": \"Draft\", \"display_name\": \"oauoa<->user@example.com\", \"context_id\": null, \"created_at\": \"2016-08-05T15:49:07\", \"updated_at\": \"2016-08-05T15:49:07\", \"ownable_type\": \"Control\", \"modified_by_id\": 1, \"person_id\": 1, \"ownable_id\": 1, \"id\": 1}',NULL,'2016-08-05 15:49:07','2016-08-05 15:49:07',1,NULL,NULL,NULL,NULL),(21,3,'Context',6,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43',1,NULL,NULL,NULL,NULL),(22,1,'Relationship',6,'created','{\"status\": \"Draft\", \"display_name\": \"Audit:1 <-> AssessmentTemplate:1\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"source_type\": \"Audit\", \"automapping_id\": null, \"destination_id\": 1, \"destination_type\": \"AssessmentTemplate\", \"source_id\": 1, \"id\": 1, \"attrs\": {}}',NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43',1,'Audit',1,'AssessmentTemplate',1),(23,1,'AssessmentTemplate',6,'created','{\"display_name\": \"aaa\", \"procedure_description\": \"\", \"title\": \"aaa\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:49:43\", \"updated_at\": \"2016-08-05T15:49:43\", \"custom_attributes\": [], \"slug\": \"TEMPLATE-1\", \"custom_attribute_definitions\": [], \"modified_by_id\": 1, \"default_people\": \"{\\\"assessors\\\":\\\"Object Owners\\\",\\\"verifiers\\\":\\\"Object Owners\\\"}\", \"test_plan_procedure\": true, \"id\": 1, \"template_object_type\": \"Control\"}',NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43',1,NULL,NULL,NULL,NULL),(24,1,'CustomAttributeDefinition',6,'created','{\"mandatory\": null, \"title\": \"aa\", \"multi_choice_mandatory\": \"0,0,2,1,3\", \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"placeholder\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"definition_id\": 1, \"definition_type\": \"assessment_template\", \"helptext\": null, \"attribute_type\": \"Dropdown\", \"context_id\": null, \"display_name\": \"aa\", \"multi_choice_options\": \"a,b,c,d,e\", \"id\": 1}',NULL,'2016-08-05 15:49:43','2016-08-05 15:49:43',1,NULL,NULL,NULL,NULL),(25,3,'Context',7,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:49:55','2016-08-05 15:49:55',1,NULL,NULL,NULL,NULL),(26,1,'Assessment',7,'created','{\"verified_date\": null, \"context_id\": 5, \"updated_at\": \"2016-08-05T15:49:55\", \"contact_id\": null, \"design\": \"\", \"id\": 1, \"finished_date\": null, \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1\", \"recipients\": \"\", \"title\": \"oauoa assessment for 2016: oauo - Audit 1\", \"custom_attributes\": [], \"custom_attribute_definitions\": [], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"Not Started\", \"description\": null, \"end_date\": null, \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"slug\": \"ASSESSMENT-1\", \"send_by_default\": null, \"url\": null, \"notes\": null, \"reference_url\": null, \"test_plan\": \"uoaeuoaeuoe\", \"operationally\": \"\", \"created_at\": \"2016-08-05T15:49:55\"}',NULL,'2016-08-05 15:49:55','2016-08-05 15:49:55',1,NULL,NULL,NULL,NULL),(27,3,'Context',8,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:50:24','2016-08-05 15:50:24',1,NULL,NULL,NULL,NULL),(28,1,'Assessment',8,'modified','{\"verified_date\": null, \"context_id\": 5, \"updated_at\": \"2016-08-05T15:50:24\", \"contact_id\": null, \"design\": \"\", \"id\": 1, \"finished_date\": null, \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1\", \"recipients\": \"\", \"title\": \"oauoa assessment for 2016: oauo - Audit 1\", \"custom_attributes\": [{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T15:50:24\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T15:50:24\", \"modified_by_id\": null, \"attribute_value\": \"e\", \"id\": 1, \"attributable_id\": 1}], \"custom_attribute_definitions\": [{\"mandatory\": null, \"title\": \"aa\", \"multi_choice_mandatory\": \"0,0,2,1,3\", \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"placeholder\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"definition_id\": 1, \"definition_type\": \"assessment\", \"helptext\": null, \"attribute_type\": \"Dropdown\", \"context_id\": null, \"display_name\": \"aa\", \"multi_choice_options\": \"a,b,c,d,e\", \"id\": 2}], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"In Progress\", \"description\": null, \"end_date\": null, \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"slug\": \"ASSESSMENT-1\", \"send_by_default\": null, \"url\": null, \"notes\": null, \"reference_url\": null, \"test_plan\": \"uoaeuoaeuoe\", \"operationally\": \"\", \"created_at\": \"2016-08-05T15:49:55\"}',NULL,'2016-08-05 15:50:24','2016-08-05 15:50:24',1,NULL,NULL,NULL,NULL),(29,1,'CustomAttributeValue',8,'created','{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T15:50:24\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T15:50:24\", \"modified_by_id\": null, \"attribute_value\": \"e\", \"id\": 1, \"attributable_id\": 1}',NULL,'2016-08-05 15:50:24','2016-08-05 15:50:24',1,NULL,NULL,NULL,NULL),(30,3,'Context',9,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:51:20','2016-08-05 15:51:20',1,NULL,NULL,NULL,NULL),(31,1,'Document',9,'created','{\"display_name\": \"IMG_9243.JPG\", \"description\": null, \"title\": \"IMG_9243.JPG\", \"kind_id\": null, \"created_at\": \"2016-08-05T15:51:20\", \"language_id\": null, \"updated_at\": \"2016-08-05T15:51:20\", \"year_id\": null, \"link\": \"https://drive.google.com/a/reciprocitylabs.com/file/d/0Bwbln5IgPB1TZWNQQWNpU0Z2ZUk/view?usp=drivesdk\", \"modified_by_id\": 1, \"context_id\": 5, \"id\": 1}',NULL,'2016-08-05 15:51:20','2016-08-05 15:51:20',1,NULL,NULL,NULL,NULL),(32,3,'Context',10,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:51:21','2016-08-05 15:51:21',1,NULL,NULL,NULL,NULL),(33,1,'ObjectDocument',10,'created','{\"status\": \"Draft\", \"created_at\": \"2016-08-05T15:51:21\", \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1<->IMG_9243.JPG\", \"end_date\": null, \"documentable_type\": \"Assessment\", \"context_id\": 5, \"notes\": null, \"updated_at\": \"2016-08-05T15:51:21\", \"start_date\": null, \"role\": null, \"modified_by_id\": 1, \"documentable_id\": 1, \"id\": 1, \"document_id\": 1}',NULL,'2016-08-05 15:51:21','2016-08-05 15:51:21',1,'Document',1,'Assessment',1),(34,3,'Context',11,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:51:21','2016-08-05 15:51:21',1,NULL,NULL,NULL,NULL),(35,1,'ObjectFile',11,'created','{\"fileable_type\": \"Document\", \"parent_folder_id\": null, \"display_name\": \"IMG_9243.JPG<-> gdrive file0Bwbln5IgPB1TZWNQQWNpU0Z2ZUk\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:51:21\", \"fileable_id\": 1, \"updated_at\": \"2016-08-05T15:51:21\", \"file_id\": \"0Bwbln5IgPB1TZWNQQWNpU0Z2ZUk\", \"modified_by_id\": 1, \"id\": 1}',NULL,'2016-08-05 15:51:21','2016-08-05 15:51:21',1,NULL,NULL,NULL,NULL),(36,3,'Context',12,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:51:23','2016-08-05 15:51:23',1,NULL,NULL,NULL,NULL),(37,1,'Comment',12,'created','{\"display_name\": \"\", \"description\": \"auoeuo\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:51:23\", \"updated_at\": \"2016-08-05T15:51:23\", \"id\": 1, \"assignee_type\": null, \"modified_by_id\": 1, \"revision_id\": null, \"custom_attribute_definition_id\": null}',NULL,'2016-08-05 15:51:23','2016-08-05 15:51:23',1,NULL,NULL,NULL,NULL),(38,3,'Context',13,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:51:23','2016-08-05 15:51:23',1,NULL,NULL,NULL,NULL),(39,6,'Relationship',13,'created','{\"status\": \"Draft\", \"display_name\": \"Assessment:1 <-> Comment:1\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:51:23\", \"modified_by_id\": 1, \"updated_at\": \"2016-08-05T15:51:23\", \"source_type\": \"Assessment\", \"automapping_id\": null, \"destination_id\": 1, \"destination_type\": \"Comment\", \"source_id\": 1, \"id\": 6, \"attrs\": {}}',NULL,'2016-08-05 15:51:23','2016-08-05 15:51:23',1,'Assessment',1,'Comment',1),(40,3,'Context',14,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:56:20','2016-08-05 15:56:20',1,NULL,NULL,NULL,NULL),(41,1,'Assessment',14,'modified','{\"verified_date\": null, \"context_id\": 5, \"updated_at\": \"2016-08-05T15:50:24\", \"contact_id\": null, \"design\": \"\", \"id\": 1, \"finished_date\": null, \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1\", \"recipients\": \"\", \"title\": \"oauoa assessment for 2016: oauo - Audit 1\", \"custom_attributes\": [{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T15:56:20\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T15:56:20\", \"modified_by_id\": null, \"attribute_value\": \"a\", \"id\": 2, \"attributable_id\": 1}], \"custom_attribute_definitions\": [{\"mandatory\": null, \"title\": \"aa\", \"multi_choice_mandatory\": \"0,0,2,1,3\", \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"placeholder\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"definition_id\": 1, \"definition_type\": \"assessment\", \"helptext\": null, \"attribute_type\": \"Dropdown\", \"context_id\": null, \"display_name\": \"aa\", \"multi_choice_options\": \"a,b,c,d,e\", \"id\": 2}], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"In Progress\", \"description\": null, \"end_date\": null, \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"slug\": \"ASSESSMENT-1\", \"send_by_default\": null, \"url\": null, \"notes\": null, \"reference_url\": null, \"test_plan\": \"uoaeuoaeuoe\", \"operationally\": \"\", \"created_at\": \"2016-08-05T15:49:55\"}',NULL,'2016-08-05 15:56:20','2016-08-05 15:56:20',1,NULL,NULL,NULL,NULL),(42,2,'CustomAttributeValue',14,'created','{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T15:56:20\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T15:56:20\", \"modified_by_id\": null, \"attribute_value\": \"a\", \"id\": 2, \"attributable_id\": 1}',NULL,'2016-08-05 15:56:20','2016-08-05 15:56:20',1,NULL,NULL,NULL,NULL),(43,3,'Context',15,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:56:25','2016-08-05 15:56:25',1,NULL,NULL,NULL,NULL),(44,2,'Comment',15,'created','{\"display_name\": \"\", \"description\": \"aoeuaouoa\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:56:25\", \"updated_at\": \"2016-08-05T15:56:25\", \"id\": 2, \"assignee_type\": null, \"modified_by_id\": 1, \"revision_id\": 42, \"custom_attribute_definition_id\": \"2\"}',NULL,'2016-08-05 15:56:25','2016-08-05 15:56:25',1,NULL,NULL,NULL,NULL),(45,3,'Context',16,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 15:56:25','2016-08-05 15:56:25',1,NULL,NULL,NULL,NULL),(46,7,'Relationship',16,'created','{\"status\": \"Draft\", \"display_name\": \"Assessment:1 <-> Comment:2\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:56:25\", \"modified_by_id\": 1, \"updated_at\": \"2016-08-05T15:56:25\", \"source_type\": \"Assessment\", \"automapping_id\": null, \"destination_id\": 2, \"destination_type\": \"Comment\", \"source_id\": 1, \"id\": 7, \"attrs\": {}}',NULL,'2016-08-05 15:56:25','2016-08-05 15:56:25',1,'Assessment',1,'Comment',2),(47,1,'Assessment',17,'modified','{\"verified_date\": null, \"context_id\": 5, \"updated_at\": \"2016-08-05T15:56:36\", \"contact_id\": null, \"design\": \"\", \"id\": 1, \"finished_date\": \"2016-08-05T15:56:36.274836\", \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1\", \"recipients\": \"\", \"title\": \"oauoa assessment for 2016: oauo - Audit 1\", \"custom_attributes\": [{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T15:56:36\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T15:56:36\", \"modified_by_id\": null, \"attribute_value\": \"a\", \"id\": 3, \"attributable_id\": 1}], \"custom_attribute_definitions\": [{\"mandatory\": null, \"title\": \"aa\", \"multi_choice_mandatory\": \"0,0,2,1,3\", \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"placeholder\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"definition_id\": 1, \"definition_type\": \"assessment\", \"helptext\": null, \"attribute_type\": \"Dropdown\", \"context_id\": null, \"display_name\": \"aa\", \"multi_choice_options\": \"a,b,c,d,e\", \"id\": 2}], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"Ready for Review\", \"description\": null, \"end_date\": null, \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"slug\": \"ASSESSMENT-1\", \"send_by_default\": null, \"url\": null, \"notes\": null, \"reference_url\": null, \"test_plan\": \"uoaeuoaeuoe\", \"operationally\": \"\", \"created_at\": \"2016-08-05T15:49:55\"}',NULL,'2016-08-05 15:56:36','2016-08-05 15:56:36',1,NULL,NULL,NULL,NULL),(48,3,'CustomAttributeValue',17,'created','{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T15:56:36\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T15:56:36\", \"modified_by_id\": null, \"attribute_value\": \"a\", \"id\": 3, \"attributable_id\": 1}',NULL,'2016-08-05 15:56:36','2016-08-05 15:56:36',1,NULL,NULL,NULL,NULL),(49,1,'Assessment',18,'modified','{\"verified_date\": null, \"context_id\": 5, \"updated_at\": \"2016-08-05T15:56:36\", \"contact_id\": null, \"design\": \"\", \"id\": 1, \"finished_date\": \"2016-08-05T15:56:36\", \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1\", \"recipients\": \"\", \"title\": \"oauoa assessment for 2016: oauo - Audit 1\", \"custom_attributes\": [{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T16:00:15\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T16:00:15\", \"modified_by_id\": null, \"attribute_value\": \"c\", \"id\": 4, \"attributable_id\": 1}], \"custom_attribute_definitions\": [{\"mandatory\": null, \"title\": \"aa\", \"multi_choice_mandatory\": \"0,0,2,1,3\", \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"placeholder\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"definition_id\": 1, \"definition_type\": \"assessment\", \"helptext\": null, \"attribute_type\": \"Dropdown\", \"context_id\": null, \"display_name\": \"aa\", \"multi_choice_options\": \"a,b,c,d,e\", \"id\": 2}], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"Ready for Review\", \"description\": null, \"end_date\": null, \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"slug\": \"ASSESSMENT-1\", \"send_by_default\": null, \"url\": null, \"notes\": null, \"reference_url\": null, \"test_plan\": \"uoaeuoaeuoe\", \"operationally\": \"\", \"created_at\": \"2016-08-05T15:49:55\"}',NULL,'2016-08-05 16:00:15','2016-08-05 16:00:15',1,NULL,NULL,NULL,NULL),(50,4,'CustomAttributeValue',18,'created','{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T16:00:15\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T16:00:15\", \"modified_by_id\": null, \"attribute_value\": \"c\", \"id\": 4, \"attributable_id\": 1}',NULL,'2016-08-05 16:00:15','2016-08-05 16:00:15',1,NULL,NULL,NULL,NULL),(51,1,'Assessment',19,'modified','{\"verified_date\": null, \"context_id\": 5, \"updated_at\": \"2016-08-05T15:56:36\", \"contact_id\": null, \"design\": \"\", \"id\": 1, \"finished_date\": \"2016-08-05T15:56:36\", \"display_name\": \"oauoa assessment for 2016: oauo - Audit 1\", \"recipients\": \"\", \"title\": \"oauoa assessment for 2016: oauo - Audit 1\", \"custom_attributes\": [{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T16:00:22\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T16:00:22\", \"modified_by_id\": null, \"attribute_value\": \"d\", \"id\": 5, \"attributable_id\": 1}], \"custom_attribute_definitions\": [{\"mandatory\": null, \"title\": \"aa\", \"multi_choice_mandatory\": \"0,0,2,1,3\", \"created_at\": \"2016-08-05T15:49:43\", \"modified_by_id\": null, \"placeholder\": null, \"updated_at\": \"2016-08-05T15:49:43\", \"definition_id\": 1, \"definition_type\": \"assessment\", \"helptext\": null, \"attribute_type\": \"Dropdown\", \"context_id\": null, \"display_name\": \"aa\", \"multi_choice_options\": \"a,b,c,d,e\", \"id\": 2}], \"modified_by_id\": 1, \"start_date\": null, \"status\": \"Ready for Review\", \"description\": null, \"end_date\": null, \"os_state\": \"Modified\", \"secondary_contact_id\": null, \"slug\": \"ASSESSMENT-1\", \"send_by_default\": null, \"url\": null, \"notes\": null, \"reference_url\": null, \"test_plan\": \"uoaeuoaeuoe\", \"operationally\": \"\", \"created_at\": \"2016-08-05T15:49:55\"}',NULL,'2016-08-05 16:00:22','2016-08-05 16:00:22',1,NULL,NULL,NULL,NULL),(52,5,'CustomAttributeValue',19,'created','{\"display_name\": \"\", \"custom_attribute_id\": \"2\", \"context_id\": null, \"created_at\": \"2016-08-05T16:00:22\", \"attributable_type\": \"Assessment\", \"attribute_object_id\": null, \"updated_at\": \"2016-08-05T16:00:22\", \"modified_by_id\": null, \"attribute_value\": \"d\", \"id\": 5, \"attributable_id\": 1}',NULL,'2016-08-05 16:00:22','2016-08-05 16:00:22',1,NULL,NULL,NULL,NULL),(53,3,'Context',20,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 16:00:29','2016-08-05 16:00:29',1,NULL,NULL,NULL,NULL),(54,3,'Comment',20,'created','{\"display_name\": \"\", \"description\": \"uoaeuoeuao\", \"context_id\": 5, \"created_at\": \"2016-08-05T16:00:29\", \"updated_at\": \"2016-08-05T16:00:29\", \"id\": 3, \"assignee_type\": null, \"modified_by_id\": 1, \"revision_id\": 52, \"custom_attribute_definition_id\": \"2\"}',NULL,'2016-08-05 16:00:29','2016-08-05 16:00:29',1,NULL,NULL,NULL,NULL),(55,3,'Context',21,'modified','{\"display_name\": \"Personal Context for user@example.com\", \"name\": \"Personal Context for user@example.com\", \"context_id\": 4, \"created_at\": \"2016-08-05T15:48:35\", \"updated_at\": \"2016-08-05T15:48:44\", \"related_object_type\": \"Person\", \"modified_by_id\": 1, \"id\": 3, \"related_object_id\": 1, \"description\": \"\"}',NULL,'2016-08-05 16:00:29','2016-08-05 16:00:29',1,NULL,NULL,NULL,NULL),(56,7,'Relationship',21,'modified','{\"status\": \"Draft\", \"display_name\": \"Assessment:1 <-> Comment:2\", \"context_id\": 5, \"created_at\": \"2016-08-05T15:56:25\", \"modified_by_id\": 1, \"updated_at\": \"2016-08-05T16:00:29\", \"source_type\": \"Assessment\", \"automapping_id\": null, \"destination_id\": 2, \"destination_type\": \"Comment\", \"source_id\": 1, \"id\": 7, \"attrs\": {}}',NULL,'2016-08-05 16:00:29','2016-08-05 16:00:29',1,'Assessment',1,'Comment',2),(57,8,'Relationship',21,'created','{\"status\": \"Draft\", \"display_name\": \"Assessment:1 <-> Comment:3\", \"context_id\": 5, \"created_at\": \"2016-08-05T16:00:29\", \"modified_by_id\": 1, \"updated_at\": \"2016-08-05T16:00:29\", \"source_type\": \"Assessment\", \"automapping_id\": null, \"destination_id\": 3, \"destination_type\": \"Comment\", \"source_id\": 1, \"id\": 8, \"attrs\": {}}',NULL,'2016-08-05 16:00:29','2016-08-05 16:00:29',1,'Assessment',1,'Comment',3);
/*!40000 ALTER TABLE `revisions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `risk_assessments`
--
DROP TABLE IF EXISTS `risk_assessments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `risk_assessments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(250) NOT NULL,
`description` text,
`notes` text,
`ra_manager_id` int(11) DEFAULT NULL,
`ra_counsel_id` int(11) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`program_id` int(11) NOT NULL,
`slug` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_slug` (`slug`),
KEY `fk_risk_assessments_manager_person_id` (`ra_manager_id`),
KEY `fk_risk_assessments_counsel_person_id` (`ra_counsel_id`),
KEY `fk_risk_assessments_contexts` (`context_id`),
KEY `ix_risk_assessments_updated_at` (`updated_at`),
CONSTRAINT `fk_risk_assessments_counsel_person_id` FOREIGN KEY (`ra_counsel_id`) REFERENCES `people` (`id`),
CONSTRAINT `fk_risk_assessments_manager_person_id` FOREIGN KEY (`ra_manager_id`) REFERENCES `people` (`id`),
CONSTRAINT `risk_assessments_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `risk_assessments`
--
LOCK TABLES `risk_assessments` WRITE;
/*!40000 ALTER TABLE `risk_assessments` DISABLE KEYS */;
/*!40000 ALTER TABLE `risk_assessments` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `risk_objects`
--
DROP TABLE IF EXISTS `risk_objects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `risk_objects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`risk_id` int(11) NOT NULL,
`object_id` int(11) NOT NULL,
`object_type` varchar(250) NOT NULL,
`status` varchar(250) DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `risk_id` (`risk_id`,`object_id`,`object_type`),
KEY `fk_risk_objects_contexts` (`context_id`),
KEY `ix_risk_id` (`risk_id`),
KEY `fk_risk_objects_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `risk_objects_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `risk_objects_ibfk_2` FOREIGN KEY (`risk_id`) REFERENCES `risks` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `risk_objects`
--
LOCK TABLES `risk_objects` WRITE;
/*!40000 ALTER TABLE `risk_objects` DISABLE KEYS */;
/*!40000 ALTER TABLE `risk_objects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `risks`
--
DROP TABLE IF EXISTS `risks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `risks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`title` varchar(250) NOT NULL,
`contact_id` int(11) DEFAULT NULL,
`description` text NOT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(250) NOT NULL,
`notes` text,
`url` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_risks` (`slug`),
UNIQUE KEY `uq_t_risks` (`title`),
KEY `fk_risks_contexts` (`context_id`),
KEY `fk_risks_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `risks_ibfk_1` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `risks`
--
LOCK TABLES `risks` WRITE;
/*!40000 ALTER TABLE `risks` DISABLE KEYS */;
/*!40000 ALTER TABLE `risks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `roles`
--
DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`permissions_json` text NOT NULL,
`description` text,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`scope` varchar(64) DEFAULT NULL,
`role_order` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_roles_contexts` (`context_id`),
KEY `ix_roles_updated_at` (`updated_at`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `roles`
--
LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` VALUES (1,'ProgramOwner','CODE DECLARED ROLE','User with authorization to peform administrative tasks such as associating users to roles within the scope of of a program.<br/><br/>When a person creates a program they are automatically given the ProgramOwner role. This allows them to Edit, Delete, or Map objects to the Program. It also allows them to add people and assign them roles when their programs are private. ProgramOwner is the most powerful role.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Private Program',1),(2,'ProgramEditor','CODE DECLARED ROLE','A user with authorization to edit mapping objects related to an access controlled program.<br/><br/>When a person has this role they can map and unmap objects to the Program and edit the Program info, but they are unable to delete the Program or assign other people roles for that program.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Private Program',2),(3,'ProgramReader','CODE DECLARED ROLE','A user with authorization to read mapping objects related to an access controlled Program.<br/><br/>This is essentially a view only role. A person with this role can access and view an otherwise private program, but they cannot map to or edit that program in any way.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Private Program',3),(5,'Reader','CODE DECLARED ROLE','This role grants a user basic, read-only, access permission to a gGRC instance.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'System',5),(6,'Editor','CODE DECLARED ROLE','Global Editor',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'System',6),(8,'Administrator','CODE DECLARED ROLE','System Administrator with super-user privileges',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Admin',8),(9,'AuditorReader','CODE DECLARED ROLE','A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects required to perform the audit.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'System Implied',9),(10,'AuditorProgramReader','CODE DECLARED ROLE','A user with Auditor role for a program audit will also have this role in the program context so that the auditor will have access to the private program information and mappings required to perform the audit.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Private Program Implied',10),(11,'ProgramAuditOwner','CODE DECLARED ROLE','A user with the ProgramOwner role for a private program will also have this role in the audit context for any audit created for that program.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Audit Implied',11),(12,'ProgramAuditEditor','CODE DECLARED ROLE','A user with the ProgramEditor role for a private program will also have this role in the audit context for any audit created for that program.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Audit Implied',12),(13,'ProgramAuditReader','CODE DECLARED ROLE','A user with the ProgramReader role for a private program will also have this role in the audit context for any audit created for that program.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Audit Implied',13),(14,'Auditor','CODE DECLARED ROLE','The permissions required by an auditor to access relevant resources for the program being audited.',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Audit',14),(15,'ProgramBasicReader','CODE DECLARED ROLE','Allow any user assigned a role in a program the ability to read Role resources.',1,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Program Implied',15),(16,'ProgramMappingEditor','CODE DECLARED ROLE','\n This role grants a user permission to edit program mappings.\n ',1,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'Private Program Implied',16),(17,'Creator','CODE DECLARED ROLE','Global creator',NULL,'2016-08-05 15:48:26','2016-08-05 15:48:26',NULL,'System',4),(18,'WorkflowOwner','CODE DECLARED ROLE','This role grants a user permission to edit workflow mappings and details',1,'2016-08-05 15:48:28','2016-08-05 15:48:28',NULL,'Workflow',NULL),(19,'WorkflowMember','CODE DECLARED ROLE','This role grants a user permission to edit workflow mappings',1,'2016-08-05 15:48:28','2016-08-05 15:48:28',NULL,'Workflow',NULL),(20,'BasicWorkflowReader','CODE DECLARED ROLE',' ',1,'2016-08-05 15:48:28','2016-08-05 15:48:28',NULL,'Workflow Implied',NULL),(21,'WorkflowBasicReader','CODE DECLARED ROLE',' ',1,'2016-08-05 15:48:28','2016-08-05 15:48:28',NULL,'Workflow Implied',NULL);
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sections`
--
DROP TABLE IF EXISTS `sections`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sections` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`na` tinyint(1) NOT NULL,
`notes` text,
`parent_id` int(11) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
`status` varchar(250) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_sections` (`slug`),
UNIQUE KEY `uq_t_sections` (`title`),
KEY `parent_id` (`parent_id`),
KEY `fk_sections_contexts` (`context_id`),
KEY `fk_sections_contact` (`contact_id`),
KEY `ix_sections_updated_at` (`updated_at`),
KEY `fk_sections_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_sections_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `sections_ibfk_2` FOREIGN KEY (`parent_id`) REFERENCES `sections` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `sections`
--
LOCK TABLES `sections` WRITE;
/*!40000 ALTER TABLE `sections` DISABLE KEYS */;
/*!40000 ALTER TABLE `sections` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `systems`
--
DROP TABLE IF EXISTS `systems`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `systems` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`infrastructure` tinyint(1) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`is_biz_process` tinyint(1) DEFAULT NULL,
`version` varchar(250) DEFAULT NULL,
`notes` text,
`network_zone_id` int(11) DEFAULT NULL,
`context_id` int(11) DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_systems` (`slug`),
UNIQUE KEY `uq_t_systems` (`title`),
KEY `fk_systems_contexts` (`context_id`),
KEY `fk_systems_contact` (`contact_id`),
KEY `ix_systems_is_biz_process` (`is_biz_process`),
KEY `ix_systems_updated_at` (`updated_at`),
KEY `fk_systems_secondary_contact` (`secondary_contact_id`),
CONSTRAINT `fk_systems_contexts` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `systems`
--
LOCK TABLES `systems` WRITE;
/*!40000 ALTER TABLE `systems` DISABLE KEYS */;
/*!40000 ALTER TABLE `systems` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `task_group_objects`
--
DROP TABLE IF EXISTS `task_group_objects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task_group_objects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`task_group_id` int(11) NOT NULL,
`object_id` int(11) NOT NULL,
`object_type` varchar(250) NOT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `task_group_id` (`task_group_id`,`object_id`,`object_type`),
KEY `fk_task_group_objects_contexts` (`context_id`),
KEY `ix_task_group_id` (`task_group_id`),
KEY `ix_task_group_objects_updated_at` (`updated_at`),
CONSTRAINT `fk_task_group_objects_context_id` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `fk_task_group_objects_task_group_id` FOREIGN KEY (`task_group_id`) REFERENCES `task_groups` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `task_group_objects`
--
LOCK TABLES `task_group_objects` WRITE;
/*!40000 ALTER TABLE `task_group_objects` DISABLE KEYS */;
/*!40000 ALTER TABLE `task_group_objects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `task_group_tasks`
--
DROP TABLE IF EXISTS `task_group_tasks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task_group_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`task_group_id` int(11) NOT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`sort_index` varchar(250) NOT NULL,
`contact_id` int(11) DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`relative_end_day` int(11) DEFAULT NULL,
`relative_end_month` int(11) DEFAULT NULL,
`relative_start_day` int(11) DEFAULT NULL,
`relative_start_month` int(11) DEFAULT NULL,
`object_approval` tinyint(1) NOT NULL,
`response_options` text NOT NULL,
`task_type` varchar(250) NOT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`slug` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_slug` (`slug`),
KEY `fk_task_group_tasks_contexts` (`context_id`),
KEY `fk_task_group_tasks_contact` (`contact_id`),
KEY `ix_task_group_tasks_updated_at` (`updated_at`),
KEY `fk_task_group_tasks_secondary_contact` (`secondary_contact_id`),
KEY `fk_task_group_tasks_task_group_id` (`task_group_id`),
CONSTRAINT `fk_task_group_tasks_context_id` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `fk_task_group_tasks_task_group_id` FOREIGN KEY (`task_group_id`) REFERENCES `task_groups` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `task_group_tasks`
--
LOCK TABLES `task_group_tasks` WRITE;
/*!40000 ALTER TABLE `task_group_tasks` DISABLE KEYS */;
/*!40000 ALTER TABLE `task_group_tasks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `task_groups`
--
DROP TABLE IF EXISTS `task_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workflow_id` int(11) NOT NULL,
`contact_id` int(11) DEFAULT NULL,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`lock_task_order` tinyint(1) DEFAULT NULL,
`sort_index` varchar(250) NOT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_task_groups` (`slug`),
KEY `fk_task_groups_contact` (`contact_id`),
KEY `fk_task_groups_contexts` (`context_id`),
KEY `ix_task_groups_updated_at` (`updated_at`),
KEY `fk_task_groups_secondary_contact` (`secondary_contact_id`),
KEY `fk_task_groups_workflow_id` (`workflow_id`),
CONSTRAINT `fk_task_groups_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `people` (`id`),
CONSTRAINT `fk_task_groups_context_id` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `fk_task_groups_workflow_id` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `task_groups`
--
LOCK TABLES `task_groups` WRITE;
/*!40000 ALTER TABLE `task_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `task_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `threats`
--
DROP TABLE IF EXISTS `threats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `threats` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) DEFAULT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_t_actors` (`title`),
UNIQUE KEY `uq_threats` (`slug`),
KEY `fk_threat_actors_secondary_contact` (`secondary_contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `threats`
--
LOCK TABLES `threats` WRITE;
/*!40000 ALTER TABLE `threats` DISABLE KEYS */;
/*!40000 ALTER TABLE `threats` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_roles`
--
DROP TABLE IF EXISTS `user_roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`person_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_role_context_person` (`role_id`,`context_id`,`person_id`),
KEY `fk_user_roles_contexts` (`context_id`),
KEY `ix_user_roles_person` (`person_id`),
KEY `ix_user_roles_updated_at` (`updated_at`),
CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_roles`
--
LOCK TABLES `user_roles` WRITE;
/*!40000 ALTER TABLE `user_roles` DISABLE KEYS */;
INSERT INTO `user_roles` VALUES (1,1,1,'2016-08-05 15:48:44','2016-08-05 15:48:44',4,1);
/*!40000 ALTER TABLE `user_roles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `vendors`
--
DROP TABLE IF EXISTS `vendors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modified_by_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`description` text,
`url` varchar(250) DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
`slug` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`context_id` int(11) DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`notes` text,
`status` varchar(250) NOT NULL,
`reference_url` varchar(250) DEFAULT NULL,
`secondary_contact_id` int(11) DEFAULT NULL,
`os_state` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_vendors_title` (`title`),
UNIQUE KEY `uq_slug_vendors` (`slug`),
KEY `fk_vendors_context` (`context_id`),
KEY `fk_vendors_contact` (`contact_id`),
KEY `fk_vendors_modified_by` (`modified_by_id`),
KEY `fk_vendors_status` (`status`),
KEY `ix_vendors_updated_at` (`updated_at`),
KEY `fk_vendors_secondary_contact` (`secondary_contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `vendors`
--
LOCK TABLES `vendors` WRITE;
/*!40000 ALTER TABLE `vendors` DISABLE KEYS */;
/*!40000 ALTER TABLE `vendors` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `workflow_people`
--
DROP TABLE IF EXISTS `workflow_people`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workflow_people` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workflow_id` int(11) NOT NULL,
`person_id` int(11) NOT NULL,
`status` varchar(250) DEFAULT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `workflow_id` (`workflow_id`,`person_id`),
KEY `fk_workflow_people_contexts` (`context_id`),
KEY `ix_person_id` (`person_id`),
KEY `ix_workflow_id` (`workflow_id`),
KEY `ix_workflow_people_updated_at` (`updated_at`),
CONSTRAINT `fk_workflow_people_context_id` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`),
CONSTRAINT `fk_workflow_people_person_id` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`),
CONSTRAINT `fk_workflow_people_workflow_id` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `workflow_people`
--
LOCK TABLES `workflow_people` WRITE;
/*!40000 ALTER TABLE `workflow_people` DISABLE KEYS */;
/*!40000 ALTER TABLE `workflow_people` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `workflows`
--
DROP TABLE IF EXISTS `workflows`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workflows` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`end_date` date DEFAULT NULL,
`start_date` date DEFAULT NULL,
`description` text,
`title` varchar(250) NOT NULL,
`slug` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`modified_by_id` int(11) DEFAULT NULL,
`updated_at` datetime NOT NULL,
`context_id` int(11) DEFAULT NULL,
`frequency` varchar(250) DEFAULT NULL,
`notify_custom_message` text,
`notify_on_change` tinyint(1) NOT NULL,
`object_approval` tinyint(1) NOT NULL,
`next_cycle_start_date` date DEFAULT NULL,
`status` varchar(250) DEFAULT NULL,
`recurrences` tinyint(1) NOT NULL,
`non_adjusted_next_cycle_start_date` date DEFAULT NULL,
`is_old_workflow` tinyint(1) DEFAULT NULL,
`kind` varchar(250) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_workflows` (`slug`),
KEY `fk_workflows_contexts` (`context_id`),
KEY `ix_workflows_updated_at` (`updated_at`),
CONSTRAINT `fk_workflows_context_id` FOREIGN KEY (`context_id`) REFERENCES `contexts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `workflows`
--
LOCK TABLES `workflows` WRITE;
/*!40000 ALTER TABLE `workflows` DISABLE KEYS */;
/*!40000 ALTER TABLE `workflows` 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 2016-08-05 16:02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment