-- MySQL dump 10.13  Distrib 5.5.39, for Linux (x86_64)
--
-- Host: localhost    Database: reviewboard-blr
-- ------------------------------------------------------
-- Server version	5.5.39

/*!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 `accounts_localsiteprofile`
--

DROP TABLE IF EXISTS `accounts_localsiteprofile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts_localsiteprofile` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `profile_id` int(11) NOT NULL,
  `local_site_id` int(11) DEFAULT NULL,
  `permissions` longtext,
  `direct_incoming_request_count` int(11) DEFAULT NULL,
  `total_incoming_request_count` int(11) DEFAULT NULL,
  `pending_outgoing_request_count` int(11) DEFAULT NULL,
  `total_outgoing_request_count` int(11) DEFAULT NULL,
  `starred_public_request_count` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`,`local_site_id`),
  UNIQUE KEY `profile_id` (`profile_id`,`local_site_id`),
  KEY `accounts_localsiteprofile_6340c63c` (`user_id`),
  KEY `accounts_localsiteprofile_5948a8a3` (`profile_id`),
  KEY `accounts_localsiteprofile_c467b315` (`local_site_id`),
  CONSTRAINT `local_site_id_refs_id_02a402db` FOREIGN KEY (`local_site_id`) REFERENCES `site_localsite` (`id`),
  CONSTRAINT `profile_id_refs_id_e7b49a70` FOREIGN KEY (`profile_id`) REFERENCES `accounts_profile` (`id`),
  CONSTRAINT `user_id_refs_id_4d31e778` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `accounts_profile`
--

DROP TABLE IF EXISTS `accounts_profile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts_profile` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `first_time_setup_done` tinyint(1) NOT NULL,
  `collapsed_diffs` tinyint(1) NOT NULL,
  `wordwrapped_diffs` tinyint(1) NOT NULL,
  `syntax_highlighting` tinyint(1) NOT NULL,
  `show_submitted` tinyint(1) NOT NULL,
  `sort_review_request_columns` varchar(256) NOT NULL,
  `sort_dashboard_columns` varchar(256) NOT NULL,
  `sort_submitter_columns` varchar(256) NOT NULL,
  `sort_group_columns` varchar(256) NOT NULL,
  `review_request_columns` varchar(256) NOT NULL,
  `dashboard_columns` varchar(256) NOT NULL,
  `submitter_columns` varchar(256) NOT NULL,
  `group_columns` varchar(256) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=239 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `accounts_profile_starred_groups`
--

DROP TABLE IF EXISTS `accounts_profile_starred_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts_profile_starred_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `profile_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `profile_id` (`profile_id`,`group_id`),
  KEY `group_id_refs_id_f1d0eabb` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `accounts_profile_starred_review_requests`
--

DROP TABLE IF EXISTS `accounts_profile_starred_review_requests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts_profile_starred_review_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `profile_id` int(11) NOT NULL,
  `reviewrequest_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `profile_id` (`profile_id`,`reviewrequest_id`),
  UNIQUE KEY `profile_starred_review_requests__reviewrequest_profile` (`reviewrequest_id`,`profile_id`)
) ENGINE=InnoDB AUTO_INCREMENT=297 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `accounts_reviewrequestvisit`
--

DROP TABLE IF EXISTS `accounts_reviewrequestvisit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts_reviewrequestvisit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `review_request_id` int(11) NOT NULL,
  `timestamp` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`,`review_request_id`),
  KEY `accounts_reviewrequestvisit_user_id` (`user_id`),
  KEY `accounts_reviewrequestvisit_review_request_id` (`review_request_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24997 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `attachments_fileattachment`
--

DROP TABLE IF EXISTS `attachments_fileattachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `attachments_fileattachment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `caption` varchar(256) NOT NULL,
  `draft_caption` varchar(256) NOT NULL,
  `orig_filename` varchar(256) DEFAULT NULL,
  `file` varchar(512) NOT NULL,
  `mimetype` varchar(256) NOT NULL,
  `repo_path` varchar(1024) DEFAULT NULL,
  `repo_revision` varchar(64) DEFAULT NULL,
  `repository_id` int(11) DEFAULT NULL,
  `added_in_filediff_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `attachments_fileattachment_3e277a4b` (`repo_revision`),
  KEY `attachments_fileattachment_a322ed1e` (`repository_id`),
  KEY `attachments_fileattachment_4b31b03f` (`added_in_filediff_id`),
  CONSTRAINT `added_in_filediff_id_refs_id_4b23a765` FOREIGN KEY (`added_in_filediff_id`) REFERENCES `diffviewer_filediff` (`id`),
  CONSTRAINT `repository_id_refs_id_3a88871a` FOREIGN KEY (`repository_id`) REFERENCES `scmtools_repository` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_group`
--

DROP TABLE IF EXISTS `auth_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_group_permissions`
--

DROP TABLE IF EXISTS `auth_group_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_group_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `group_id` (`group_id`,`permission_id`),
  KEY `permission_id_refs_id_a7792de1` (`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_message`
--

DROP TABLE IF EXISTS `auth_message`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `message` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `auth_message_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=271 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_permission`
--

DROP TABLE IF EXISTS `auth_permission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `content_type_id` int(11) NOT NULL,
  `codename` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `content_type_id` (`content_type_id`,`codename`),
  KEY `auth_permission_content_type_id` (`content_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_user`
--

DROP TABLE IF EXISTS `auth_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) NOT NULL,
  `first_name` varchar(30) NOT NULL,
  `last_name` varchar(30) NOT NULL,
  `email` varchar(75) NOT NULL,
  `password` varchar(128) NOT NULL,
  `is_staff` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `is_superuser` tinyint(1) NOT NULL,
  `last_login` datetime NOT NULL,
  `date_joined` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_user_groups`
--

DROP TABLE IF EXISTS `auth_user_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_user_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`,`group_id`),
  KEY `group_id_refs_id_f0ee9890` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `auth_user_user_permissions`
--

DROP TABLE IF EXISTS `auth_user_user_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auth_user_user_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`,`permission_id`),
  KEY `permission_id_refs_id_67e79cb` (`permission_id`)
) ENGINE=InnoDB AUTO_INCREMENT=256 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `changedescs_changedescription`
--

DROP TABLE IF EXISTS `changedescs_changedescription`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `changedescs_changedescription` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` datetime NOT NULL,
  `public` tinyint(1) NOT NULL,
  `text` longtext NOT NULL,
  `fields_changed` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6408 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `diffviewer_diffset`
--

DROP TABLE IF EXISTS `diffviewer_diffset`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `diffviewer_diffset` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(256) NOT NULL,
  `revision` int(11) NOT NULL,
  `timestamp` datetime NOT NULL,
  `history_id` int(11) DEFAULT NULL,
  `repository_id` int(11) NOT NULL,
  `diffcompat` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `diffviewer_diffset_history_id` (`history_id`),
  KEY `diffviewer_diffset_repository_id` (`repository_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16417 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `diffviewer_diffsethistory`
--

DROP TABLE IF EXISTS `diffviewer_diffsethistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `diffviewer_diffsethistory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(256) NOT NULL,
  `timestamp` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12667 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `diffviewer_filediff`
--

DROP TABLE IF EXISTS `diffviewer_filediff`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `diffviewer_filediff` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `diffset_id` int(11) NOT NULL,
  `source_file` varchar(1024) NOT NULL,
  `dest_file` varchar(1024) NOT NULL,
  `source_revision` varchar(512) NOT NULL,
  `dest_detail` varchar(512) NOT NULL,
  `diff_base64` longtext NOT NULL,
  `binary` tinyint(1) NOT NULL,
  `parent_diff_base64` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `diffviewer_filediff_diffset_id` (`diffset_id`)
) ENGINE=InnoDB AUTO_INCREMENT=115740 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `diffviewer_filediffdata`
--

DROP TABLE IF EXISTS `diffviewer_filediffdata`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `diffviewer_filediffdata` (
  `binary_hash` varchar(40) NOT NULL,
  `binary` longtext NOT NULL,
  `extra_data` longtext,
  PRIMARY KEY (`binary_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `django_admin_log`
--

DROP TABLE IF EXISTS `django_admin_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_admin_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `action_time` datetime NOT NULL,
  `user_id` int(11) NOT NULL,
  `content_type_id` int(11) DEFAULT NULL,
  `object_id` longtext,
  `object_repr` varchar(200) NOT NULL,
  `action_flag` smallint(5) unsigned NOT NULL,
  `change_message` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `django_admin_log_user_id` (`user_id`),
  KEY `django_admin_log_content_type_id` (`content_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=276 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `django_content_type`
--

DROP TABLE IF EXISTS `django_content_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_content_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `app_label` varchar(100) NOT NULL,
  `model` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `app_label` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `django_evolution`
--

DROP TABLE IF EXISTS `django_evolution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_evolution` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `version_id` int(11) NOT NULL,
  `app_label` varchar(200) NOT NULL,
  `label` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `django_evolution_version_id` (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `django_project_version`
--

DROP TABLE IF EXISTS `django_project_version`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_project_version` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `signature` longtext NOT NULL,
  `when` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `django_session`
--

DROP TABLE IF EXISTS `django_session`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_session` (
  `session_key` varchar(40) NOT NULL,
  `session_data` longtext NOT NULL,
  `expire_date` datetime NOT NULL,
  PRIMARY KEY (`session_key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `django_site`
--

DROP TABLE IF EXISTS `django_site`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `django_site` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `domain` varchar(100) NOT NULL,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `extensions_registeredextension`
--

DROP TABLE IF EXISTS `extensions_registeredextension`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `extensions_registeredextension` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(128) NOT NULL,
  `name` varchar(32) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `installed` tinyint(1) NOT NULL,
  `settings` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `class_name` (`class_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `hostingsvcs_hostingserviceaccount`
--

DROP TABLE IF EXISTS `hostingsvcs_hostingserviceaccount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `hostingsvcs_hostingserviceaccount` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `service_name` varchar(128) NOT NULL,
  `hosting_url` varchar(255) DEFAULT NULL,
  `username` varchar(128) NOT NULL,
  `data` longtext NOT NULL,
  `visible` tinyint(1) NOT NULL,
  `local_site_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `hostingsvcs_hostingserviceaccount_c467b315` (`local_site_id`),
  CONSTRAINT `local_site_id_refs_id_a9322242` FOREIGN KEY (`local_site_id`) REFERENCES `site_localsite` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_comment`
--

DROP TABLE IF EXISTS `reviews_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `filediff_id` int(11) NOT NULL,
  `interfilediff_id` int(11) DEFAULT NULL,
  `reply_to_id` int(11) DEFAULT NULL,
  `timestamp` datetime NOT NULL,
  `text` longtext NOT NULL,
  `first_line` int(10) unsigned DEFAULT NULL,
  `num_lines` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `reviews_comment_filediff_id` (`filediff_id`),
  KEY `reviews_comment_interfilediff_id` (`interfilediff_id`),
  KEY `reviews_comment_reply_to_id` (`reply_to_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30952 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_defaultreviewer`
--

DROP TABLE IF EXISTS `reviews_defaultreviewer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_defaultreviewer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `file_regex` varchar(256) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_defaultreviewer_groups`
--

DROP TABLE IF EXISTS `reviews_defaultreviewer_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_defaultreviewer_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `defaultreviewer_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `defaultreviewer_id` (`defaultreviewer_id`,`group_id`),
  KEY `group_id_refs_id_26ae5c3c` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_defaultreviewer_people`
--

DROP TABLE IF EXISTS `reviews_defaultreviewer_people`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_defaultreviewer_people` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `defaultreviewer_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `defaultreviewer_id` (`defaultreviewer_id`,`user_id`),
  KEY `user_id_refs_id_62bc5f6c` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_defaultreviewer_repository`
--

DROP TABLE IF EXISTS `reviews_defaultreviewer_repository`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_defaultreviewer_repository` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `defaultreviewer_id` int(11) NOT NULL,
  `repository_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `defaultreviewer_id` (`defaultreviewer_id`,`repository_id`),
  KEY `repository_id_refs_id_76c00819` (`repository_id`),
  CONSTRAINT `defaultreviewer_id_refs_id_b8151726` FOREIGN KEY (`defaultreviewer_id`) REFERENCES `reviews_defaultreviewer` (`id`),
  CONSTRAINT `repository_id_refs_id_76c00819` FOREIGN KEY (`repository_id`) REFERENCES `scmtools_repository` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_fileattachmentcomment`
--

DROP TABLE IF EXISTS `reviews_fileattachmentcomment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_fileattachmentcomment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `issue_opened` tinyint(1) NOT NULL,
  `issue_status` varchar(1) DEFAULT NULL,
  `reply_to_id` int(11) DEFAULT NULL,
  `timestamp` datetime NOT NULL,
  `text` longtext NOT NULL,
  `rich_text` tinyint(1) NOT NULL,
  `extra_data` longtext,
  `file_attachment_id` int(11) NOT NULL,
  `diff_against_file_attachment_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `reviews_fileattachmentcomment_3b281963` (`issue_status`),
  KEY `reviews_fileattachmentcomment_3fde75e6` (`reply_to_id`),
  KEY `reviews_fileattachmentcomment_a9d9ad46` (`file_attachment_id`),
  KEY `reviews_fileattachmentcomment_57fb824c` (`diff_against_file_attachment_id`),
  CONSTRAINT `diff_against_file_attachment_id_refs_id_e1503f1b` FOREIGN KEY (`diff_against_file_attachment_id`) REFERENCES `attachments_fileattachment` (`id`),
  CONSTRAINT `file_attachment_id_refs_id_e1503f1b` FOREIGN KEY (`file_attachment_id`) REFERENCES `attachments_fileattachment` (`id`),
  CONSTRAINT `reply_to_id_refs_id_3eba00fd` FOREIGN KEY (`reply_to_id`) REFERENCES `reviews_fileattachmentcomment` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_group`
--

DROP TABLE IF EXISTS `reviews_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `display_name` varchar(64) NOT NULL,
  `mailing_list` varchar(75) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_group_users`
--

DROP TABLE IF EXISTS `reviews_group_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_group_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `group_id` (`group_id`,`user_id`),
  KEY `user_id_refs_id_5b8bf0e9` (`user_id`),
  KEY `group_users__group_user` (`group_id`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1127 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_review`
--

DROP TABLE IF EXISTS `reviews_review`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_review` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `review_request_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `timestamp` datetime NOT NULL,
  `public` tinyint(1) NOT NULL,
  `ship_it` tinyint(1) NOT NULL,
  `base_reply_to_id` int(11) DEFAULT NULL,
  `email_message_id` varchar(255) DEFAULT NULL,
  `time_emailed` datetime DEFAULT NULL,
  `body_top` longtext NOT NULL,
  `body_bottom` longtext NOT NULL,
  `body_top_reply_to_id` int(11) DEFAULT NULL,
  `body_bottom_reply_to_id` int(11) DEFAULT NULL,
  `reviewed_diffset_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `reviews_review_review_request_id` (`review_request_id`),
  KEY `reviews_review_user_id` (`user_id`),
  KEY `reviews_review_base_reply_to_id` (`base_reply_to_id`),
  KEY `reviews_review_body_top_reply_to_id` (`body_top_reply_to_id`),
  KEY `reviews_review_body_bottom_reply_to_id` (`body_bottom_reply_to_id`),
  KEY `reviews_review_reviewed_diffset_id` (`reviewed_diffset_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18639 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_review_comments`
--

DROP TABLE IF EXISTS `reviews_review_comments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_review_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `review_id` int(11) NOT NULL,
  `comment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `review_id` (`review_id`,`comment_id`),
  KEY `comment_id_refs_id_fdbb0d2f` (`comment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30963 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_review_file_attachment_comments`
--

DROP TABLE IF EXISTS `reviews_review_file_attachment_comments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_review_file_attachment_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `review_id` int(11) NOT NULL,
  `fileattachmentcomment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `review_id` (`review_id`,`fileattachmentcomment_id`),
  KEY `fileattachmentcomment_id_refs_id_30af9b48` (`fileattachmentcomment_id`),
  CONSTRAINT `fileattachmentcomment_id_refs_id_30af9b48` FOREIGN KEY (`fileattachmentcomment_id`) REFERENCES `reviews_fileattachmentcomment` (`id`),
  CONSTRAINT `review_id_refs_id_e645043f` FOREIGN KEY (`review_id`) REFERENCES `reviews_review` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_review_screenshot_comments`
--

DROP TABLE IF EXISTS `reviews_review_screenshot_comments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_review_screenshot_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `review_id` int(11) NOT NULL,
  `screenshotcomment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `review_id` (`review_id`,`screenshotcomment_id`),
  KEY `screenshotcomment_id_refs_id_24c2082d` (`screenshotcomment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest`
--

DROP TABLE IF EXISTS `reviews_reviewrequest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `submitter_id` int(11) NOT NULL,
  `time_added` datetime NOT NULL,
  `last_updated` datetime NOT NULL,
  `status` varchar(1) NOT NULL,
  `public` tinyint(1) NOT NULL,
  `changenum` int(10) unsigned DEFAULT NULL,
  `repository_id` int(11) NOT NULL,
  `email_message_id` varchar(255) DEFAULT NULL,
  `time_emailed` datetime DEFAULT NULL,
  `summary` varchar(300) NOT NULL,
  `description` longtext NOT NULL,
  `testing_done` longtext NOT NULL,
  `bugs_closed` varchar(300) NOT NULL,
  `diffset_history_id` int(11) NOT NULL,
  `branch` varchar(300) NOT NULL,
  `last_review_timestamp` datetime DEFAULT NULL,
  `shipit_count` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `changenum` (`changenum`,`repository_id`),
  KEY `reviews_reviewrequest_submitter_id` (`submitter_id`),
  KEY `reviews_reviewrequest_status` (`status`),
  KEY `reviews_reviewrequest_changenum` (`changenum`),
  KEY `reviews_reviewrequest_repository_id` (`repository_id`),
  KEY `reviews_reviewrequest_diffset_history_id` (`diffset_history_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12667 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_changedescs`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_changedescs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_changedescs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `changedescription_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`changedescription_id`),
  KEY `changedescription_id_refs_id_f7b94348` (`changedescription_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5499 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_depends_on`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_depends_on`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_depends_on` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from_reviewrequest_id` int(11) NOT NULL,
  `to_reviewrequest_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `from_reviewrequest_id` (`from_reviewrequest_id`,`to_reviewrequest_id`),
  KEY `to_reviewrequest_id_refs_id_623cfa96` (`to_reviewrequest_id`),
  CONSTRAINT `from_reviewrequest_id_refs_id_623cfa96` FOREIGN KEY (`from_reviewrequest_id`) REFERENCES `reviews_reviewrequest` (`id`),
  CONSTRAINT `to_reviewrequest_id_refs_id_623cfa96` FOREIGN KEY (`to_reviewrequest_id`) REFERENCES `reviews_reviewrequest` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_file_attachments`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_file_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_file_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `fileattachment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`fileattachment_id`),
  KEY `fileattachment_id_refs_id_f1d94ed7` (`fileattachment_id`),
  CONSTRAINT `fileattachment_id_refs_id_f1d94ed7` FOREIGN KEY (`fileattachment_id`) REFERENCES `attachments_fileattachment` (`id`),
  CONSTRAINT `reviewrequest_id_refs_id_4d6f12c9` FOREIGN KEY (`reviewrequest_id`) REFERENCES `reviews_reviewrequest` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_inactive_file_attachments`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_inactive_file_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_inactive_file_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `fileattachment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`fileattachment_id`),
  KEY `fileattachment_id_refs_id_577d7f58` (`fileattachment_id`),
  CONSTRAINT `fileattachment_id_refs_id_577d7f58` FOREIGN KEY (`fileattachment_id`) REFERENCES `attachments_fileattachment` (`id`),
  CONSTRAINT `reviewrequest_id_refs_id_eb423b91` FOREIGN KEY (`reviewrequest_id`) REFERENCES `reviews_reviewrequest` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_inactive_screenshots`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_inactive_screenshots`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_inactive_screenshots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `screenshot_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`screenshot_id`),
  KEY `screenshot_id_refs_id_10b11c4c` (`screenshot_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_screenshots`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_screenshots`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_screenshots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `screenshot_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`screenshot_id`),
  KEY `screenshot_id_refs_id_3e4abe6d` (`screenshot_id`)
) ENGINE=InnoDB AUTO_INCREMENT=197 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_target_groups`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_target_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_target_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`group_id`),
  UNIQUE KEY `reviewrequest_target_groups__reviewrequest_group` (`reviewrequest_id`,`group_id`),
  KEY `group_id_refs_id_1e6c8414` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5717 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequest_target_people`
--

DROP TABLE IF EXISTS `reviews_reviewrequest_target_people`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequest_target_people` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequest_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequest_id` (`reviewrequest_id`,`user_id`),
  KEY `user_id_refs_id_4dfd3814` (`user_id`),
  KEY `reviewrequest_target_people__reviewrequest_user` (`reviewrequest_id`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17784 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `review_request_id` int(11) NOT NULL,
  `last_updated` datetime NOT NULL,
  `summary` varchar(300) NOT NULL,
  `description` longtext NOT NULL,
  `testing_done` longtext NOT NULL,
  `bugs_closed` varchar(300) NOT NULL,
  `diffset_id` int(11) DEFAULT NULL,
  `changedesc_id` int(11) DEFAULT NULL,
  `branch` varchar(300) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `review_request_id` (`review_request_id`),
  KEY `reviews_reviewrequestdraft_diffset_id` (`diffset_id`),
  KEY `reviews_reviewrequestdraft_changedesc_id` (`changedesc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14780 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_depends_on`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_depends_on`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_depends_on` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `reviewrequest_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`reviewrequest_id`),
  KEY `reviewrequest_id_refs_id_5a1afe0a` (`reviewrequest_id`),
  CONSTRAINT `reviewrequestdraft_id_refs_id_c4b4d8e7` FOREIGN KEY (`reviewrequestdraft_id`) REFERENCES `reviews_reviewrequestdraft` (`id`),
  CONSTRAINT `reviewrequest_id_refs_id_5a1afe0a` FOREIGN KEY (`reviewrequest_id`) REFERENCES `reviews_reviewrequest` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_file_attachments`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_file_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_file_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `fileattachment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`fileattachment_id`),
  KEY `fileattachment_id_refs_id_2465ba7e` (`fileattachment_id`),
  CONSTRAINT `fileattachment_id_refs_id_2465ba7e` FOREIGN KEY (`fileattachment_id`) REFERENCES `attachments_fileattachment` (`id`),
  CONSTRAINT `reviewrequestdraft_id_refs_id_1aecf183` FOREIGN KEY (`reviewrequestdraft_id`) REFERENCES `reviews_reviewrequestdraft` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_inactive_file_attachments`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_inactive_file_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_inactive_file_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `fileattachment_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`fileattachment_id`),
  KEY `fileattachment_id_refs_id_d14aea36` (`fileattachment_id`),
  CONSTRAINT `fileattachment_id_refs_id_d14aea36` FOREIGN KEY (`fileattachment_id`) REFERENCES `attachments_fileattachment` (`id`),
  CONSTRAINT `reviewrequestdraft_id_refs_id_7022aa5d` FOREIGN KEY (`reviewrequestdraft_id`) REFERENCES `reviews_reviewrequestdraft` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_inactive_screenshots`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_inactive_screenshots`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_inactive_screenshots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `screenshot_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`screenshot_id`),
  KEY `screenshot_id_refs_id_9bfd3b48` (`screenshot_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_screenshots`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_screenshots`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_screenshots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `screenshot_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`screenshot_id`),
  KEY `screenshot_id_refs_id_f4164ceb` (`screenshot_id`)
) ENGINE=InnoDB AUTO_INCREMENT=384 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_target_groups`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_target_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_target_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`group_id`),
  KEY `group_id_refs_id_d52232fc` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10630 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_reviewrequestdraft_target_people`
--

DROP TABLE IF EXISTS `reviews_reviewrequestdraft_target_people`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_reviewrequestdraft_target_people` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reviewrequestdraft_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reviewrequestdraft_id` (`reviewrequestdraft_id`,`user_id`),
  KEY `user_id_refs_id_5ff3d698` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=38443 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_screenshot`
--

DROP TABLE IF EXISTS `reviews_screenshot`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_screenshot` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `caption` varchar(256) NOT NULL,
  `draft_caption` varchar(256) NOT NULL,
  `image` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `reviews_screenshotcomment`
--

DROP TABLE IF EXISTS `reviews_screenshotcomment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_screenshotcomment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `screenshot_id` int(11) NOT NULL,
  `reply_to_id` int(11) DEFAULT NULL,
  `timestamp` datetime NOT NULL,
  `text` longtext NOT NULL,
  `x` smallint(5) unsigned DEFAULT NULL,
  `y` smallint(5) unsigned NOT NULL,
  `w` smallint(5) unsigned NOT NULL,
  `h` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `reviews_screenshotcomment_screenshot_id` (`screenshot_id`),
  KEY `reviews_screenshotcomment_reply_to_id` (`reply_to_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `scmtools_repository`
--

DROP TABLE IF EXISTS `scmtools_repository`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `scmtools_repository` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `path` varchar(128) NOT NULL,
  `mirror_path` varchar(128) NOT NULL,
  `username` varchar(32) NOT NULL,
  `password` varchar(128) NOT NULL,
  `tool_id` int(11) NOT NULL,
  `bug_tracker` varchar(256) NOT NULL,
  `encoding` varchar(32) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `path` (`path`),
  KEY `scmtools_repository_tool_id` (`tool_id`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `scmtools_repository_review_groups`
--

DROP TABLE IF EXISTS `scmtools_repository_review_groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `scmtools_repository_review_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `repository_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `repository_id` (`repository_id`,`group_id`),
  KEY `group_id_refs_id_b6406c8f` (`group_id`),
  CONSTRAINT `group_id_refs_id_b6406c8f` FOREIGN KEY (`group_id`) REFERENCES `reviews_group` (`id`),
  CONSTRAINT `repository_id_refs_id_9eb734d7` FOREIGN KEY (`repository_id`) REFERENCES `scmtools_repository` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `scmtools_repository_users`
--

DROP TABLE IF EXISTS `scmtools_repository_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `scmtools_repository_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `repository_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `repository_id` (`repository_id`,`user_id`),
  KEY `user_id_refs_id_0d10a9f6` (`user_id`),
  CONSTRAINT `repository_id_refs_id_1e758eaa` FOREIGN KEY (`repository_id`) REFERENCES `scmtools_repository` (`id`),
  CONSTRAINT `user_id_refs_id_0d10a9f6` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `scmtools_tool`
--

DROP TABLE IF EXISTS `scmtools_tool`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `scmtools_tool` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `class_name` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `class_name` (`class_name`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `site_localsite`
--

DROP TABLE IF EXISTS `site_localsite`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `site_localsite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `public` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `site_localsite_admins`
--

DROP TABLE IF EXISTS `site_localsite_admins`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `site_localsite_admins` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `localsite_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `localsite_id` (`localsite_id`,`user_id`),
  KEY `site_localsite_admins_9fda9bcd` (`localsite_id`),
  KEY `site_localsite_admins_6340c63c` (`user_id`),
  CONSTRAINT `localsite_id_refs_id_0317c9fa` FOREIGN KEY (`localsite_id`) REFERENCES `site_localsite` (`id`),
  CONSTRAINT `user_id_refs_id_378c8eaa` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `site_localsite_users`
--

DROP TABLE IF EXISTS `site_localsite_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `site_localsite_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `localsite_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `localsite_id` (`localsite_id`,`user_id`),
  KEY `site_localsite_users_9fda9bcd` (`localsite_id`),
  KEY `site_localsite_users_6340c63c` (`user_id`),
  CONSTRAINT `localsite_id_refs_id_d327526e` FOREIGN KEY (`localsite_id`) REFERENCES `site_localsite` (`id`),
  CONSTRAINT `user_id_refs_id_0396f0bc` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `siteconfig_siteconfiguration`
--

DROP TABLE IF EXISTS `siteconfig_siteconfiguration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `siteconfig_siteconfiguration` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `site_id` int(11) NOT NULL,
  `version` varchar(20) NOT NULL,
  `settings` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `siteconfig_siteconfiguration_site_id` (`site_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2015-03-03 15:47:56
