Skip to content

Instantly share code, notes, and snippets.

@kosciuk
Created October 2, 2016 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosciuk/b006c64149337b23d2a7e44d68ac979b to your computer and use it in GitHub Desktop.
Save kosciuk/b006c64149337b23d2a7e44d68ac979b to your computer and use it in GitHub Desktop.
Diaspora* Database Schema
-- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64)
--
-- Host: localhost Database: diaspora_production
-- ------------------------------------------------------
-- Server version 5.7.15-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `account_deletions`
--
DROP TABLE IF EXISTS `account_deletions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account_deletions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`diaspora_handle` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`person_id` int(11) DEFAULT NULL,
`completed_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `account_deletions`
--
LOCK TABLES `account_deletions` WRITE;
/*!40000 ALTER TABLE `account_deletions` DISABLE KEYS */;
/*!40000 ALTER TABLE `account_deletions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `aspect_memberships`
--
DROP TABLE IF EXISTS `aspect_memberships`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspect_memberships` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`aspect_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_aspect_memberships_on_aspect_id_and_contact_id` (`aspect_id`,`contact_id`) USING BTREE,
KEY `index_aspect_memberships_on_aspect_id` (`aspect_id`) USING BTREE,
KEY `index_aspect_memberships_on_contact_id` (`contact_id`) USING BTREE,
CONSTRAINT `aspect_memberships_aspect_id_fk` FOREIGN KEY (`aspect_id`) REFERENCES `aspects` (`id`) ON DELETE CASCADE,
CONSTRAINT `aspect_memberships_contact_id_fk` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `aspect_memberships`
--
LOCK TABLES `aspect_memberships` WRITE;
/*!40000 ALTER TABLE `aspect_memberships` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspect_memberships` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `aspect_visibilities`
--
DROP TABLE IF EXISTS `aspect_visibilities`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspect_visibilities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shareable_id` int(11) NOT NULL,
`aspect_id` int(11) NOT NULL,
`shareable_type` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Post',
PRIMARY KEY (`id`),
KEY `index_aspect_visibilities_on_aspect_id` (`aspect_id`) USING BTREE,
KEY `shareable_and_aspect_id` (`shareable_id`,`shareable_type`(189),`aspect_id`) USING BTREE,
KEY `index_aspect_visibilities_on_shareable_id_and_shareable_type` (`shareable_id`,`shareable_type`(190)) USING BTREE,
CONSTRAINT `aspect_visibilities_aspect_id_fk` FOREIGN KEY (`aspect_id`) REFERENCES `aspects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `aspect_visibilities`
--
LOCK TABLES `aspect_visibilities` WRITE;
/*!40000 ALTER TABLE `aspect_visibilities` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspect_visibilities` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `aspects`
--
DROP TABLE IF EXISTS `aspects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`contacts_visible` tinyint(1) NOT NULL DEFAULT '1',
`order_id` int(11) DEFAULT NULL,
`chat_enabled` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `index_aspects_on_user_id_and_contacts_visible` (`user_id`,`contacts_visible`) USING BTREE,
KEY `index_aspects_on_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `aspects`
--
LOCK TABLES `aspects` WRITE;
/*!40000 ALTER TABLE `aspects` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `authorizations`
--
DROP TABLE IF EXISTS `authorizations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `authorizations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`o_auth_application_id` int(11) DEFAULT NULL,
`refresh_token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`code` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`redirect_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`nonce` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`scopes` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`code_used` tinyint(1) DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `index_authorizations_on_o_auth_application_id` (`o_auth_application_id`) USING BTREE,
KEY `index_authorizations_on_user_id` (`user_id`) USING BTREE,
CONSTRAINT `fk_rails_4ecef5b8c5` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
CONSTRAINT `fk_rails_e166644de5` FOREIGN KEY (`o_auth_application_id`) REFERENCES `o_auth_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `authorizations`
--
LOCK TABLES `authorizations` WRITE;
/*!40000 ALTER TABLE `authorizations` DISABLE KEYS */;
/*!40000 ALTER TABLE `authorizations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `blocks`
--
DROP TABLE IF EXISTS `blocks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `blocks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`person_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `blocks`
--
LOCK TABLES `blocks` WRITE;
/*!40000 ALTER TABLE `blocks` DISABLE KEYS */;
/*!40000 ALTER TABLE `blocks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chat_contacts`
--
DROP TABLE IF EXISTS `chat_contacts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chat_contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`jid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`ask` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL,
`subscription` varchar(128) COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_chat_contacts_on_user_id_and_jid` (`user_id`,`jid`(190)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chat_contacts`
--
LOCK TABLES `chat_contacts` WRITE;
/*!40000 ALTER TABLE `chat_contacts` DISABLE KEYS */;
/*!40000 ALTER TABLE `chat_contacts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chat_fragments`
--
DROP TABLE IF EXISTS `chat_fragments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chat_fragments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`root` varchar(256) COLLATE utf8mb4_bin NOT NULL,
`namespace` varchar(256) COLLATE utf8mb4_bin NOT NULL,
`xml` text COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_chat_fragments_on_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chat_fragments`
--
LOCK TABLES `chat_fragments` WRITE;
/*!40000 ALTER TABLE `chat_fragments` DISABLE KEYS */;
/*!40000 ALTER TABLE `chat_fragments` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chat_offline_messages`
--
DROP TABLE IF EXISTS `chat_offline_messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chat_offline_messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`to` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`message` text COLLATE utf8mb4_bin NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chat_offline_messages`
--
LOCK TABLES `chat_offline_messages` WRITE;
/*!40000 ALTER TABLE `chat_offline_messages` DISABLE KEYS */;
/*!40000 ALTER TABLE `chat_offline_messages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `comment_signatures`
--
DROP TABLE IF EXISTS `comment_signatures`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `comment_signatures` (
`comment_id` int(11) NOT NULL,
`author_signature` text COLLATE utf8mb4_bin NOT NULL,
`signature_order_id` int(11) NOT NULL,
`additional_data` text COLLATE utf8mb4_bin,
UNIQUE KEY `index_comment_signatures_on_comment_id` (`comment_id`) USING BTREE,
KEY `comment_signatures_signature_orders_id_fk` (`signature_order_id`) USING BTREE,
CONSTRAINT `comment_signatures_comment_id_fk` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE,
CONSTRAINT `comment_signatures_signature_orders_id_fk` FOREIGN KEY (`signature_order_id`) REFERENCES `signature_orders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `comment_signatures`
--
LOCK TABLES `comment_signatures` WRITE;
/*!40000 ALTER TABLE `comment_signatures` DISABLE KEYS */;
/*!40000 ALTER TABLE `comment_signatures` 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,
`text` text COLLATE utf8mb4_bin NOT NULL,
`commentable_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`likes_count` int(11) NOT NULL DEFAULT '0',
`commentable_type` varchar(60) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Post',
PRIMARY KEY (`id`),
UNIQUE KEY `index_comments_on_guid` (`guid`(191)) USING BTREE,
KEY `index_comments_on_person_id` (`author_id`) USING BTREE,
KEY `index_comments_on_commentable_id_and_commentable_type` (`commentable_id`,`commentable_type`) USING BTREE,
CONSTRAINT `comments_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `comments`
--
LOCK TABLES `comments` WRITE;
/*!40000 ALTER TABLE `comments` DISABLE KEYS */;
/*!40000 ALTER TABLE `comments` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `contacts`
--
DROP TABLE IF EXISTS `contacts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`person_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`sharing` tinyint(1) NOT NULL DEFAULT '0',
`receiving` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `index_contacts_on_user_id_and_person_id` (`user_id`,`person_id`) USING BTREE,
KEY `index_contacts_on_person_id` (`person_id`) USING BTREE,
CONSTRAINT `contacts_person_id_fk` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `contacts`
--
LOCK TABLES `contacts` WRITE;
/*!40000 ALTER TABLE `contacts` DISABLE KEYS */;
/*!40000 ALTER TABLE `contacts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `conversation_visibilities`
--
DROP TABLE IF EXISTS `conversation_visibilities`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `conversation_visibilities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`conversation_id` int(11) NOT NULL,
`person_id` int(11) NOT NULL,
`unread` int(11) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_conversation_visibilities_usefully` (`conversation_id`,`person_id`) USING BTREE,
KEY `index_conversation_visibilities_on_conversation_id` (`conversation_id`) USING BTREE,
KEY `index_conversation_visibilities_on_person_id` (`person_id`) USING BTREE,
CONSTRAINT `conversation_visibilities_conversation_id_fk` FOREIGN KEY (`conversation_id`) REFERENCES `conversations` (`id`) ON DELETE CASCADE,
CONSTRAINT `conversation_visibilities_person_id_fk` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `conversation_visibilities`
--
LOCK TABLES `conversation_visibilities` WRITE;
/*!40000 ALTER TABLE `conversation_visibilities` DISABLE KEYS */;
/*!40000 ALTER TABLE `conversation_visibilities` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `conversations`
--
DROP TABLE IF EXISTS `conversations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `conversations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`subject` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`author_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_conversations_on_guid` (`guid`(191)) USING BTREE,
KEY `conversations_author_id_fk` (`author_id`) USING BTREE,
CONSTRAINT `conversations_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `conversations`
--
LOCK TABLES `conversations` WRITE;
/*!40000 ALTER TABLE `conversations` DISABLE KEYS */;
/*!40000 ALTER TABLE `conversations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `invitation_codes`
--
DROP TABLE IF EXISTS `invitation_codes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invitation_codes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `invitation_codes`
--
LOCK TABLES `invitation_codes` WRITE;
/*!40000 ALTER TABLE `invitation_codes` DISABLE KEYS */;
/*!40000 ALTER TABLE `invitation_codes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `like_signatures`
--
DROP TABLE IF EXISTS `like_signatures`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `like_signatures` (
`like_id` int(11) NOT NULL,
`author_signature` text COLLATE utf8mb4_bin NOT NULL,
`signature_order_id` int(11) NOT NULL,
`additional_data` text COLLATE utf8mb4_bin,
UNIQUE KEY `index_like_signatures_on_like_id` (`like_id`) USING BTREE,
KEY `like_signatures_signature_orders_id_fk` (`signature_order_id`) USING BTREE,
CONSTRAINT `like_signatures_like_id_fk` FOREIGN KEY (`like_id`) REFERENCES `likes` (`id`) ON DELETE CASCADE,
CONSTRAINT `like_signatures_signature_orders_id_fk` FOREIGN KEY (`signature_order_id`) REFERENCES `signature_orders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `like_signatures`
--
LOCK TABLES `like_signatures` WRITE;
/*!40000 ALTER TABLE `like_signatures` DISABLE KEYS */;
/*!40000 ALTER TABLE `like_signatures` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `likes`
--
DROP TABLE IF EXISTS `likes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `likes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`positive` tinyint(1) DEFAULT '1',
`target_id` int(11) DEFAULT NULL,
`author_id` int(11) DEFAULT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`target_type` varchar(60) COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_likes_on_target_id_and_author_id_and_target_type` (`target_id`,`author_id`,`target_type`) USING BTREE,
UNIQUE KEY `index_likes_on_guid` (`guid`(191)) USING BTREE,
KEY `likes_author_id_fk` (`author_id`) USING BTREE,
KEY `index_likes_on_post_id` (`target_id`) USING BTREE,
CONSTRAINT `likes_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `likes`
--
LOCK TABLES `likes` WRITE;
/*!40000 ALTER TABLE `likes` DISABLE KEYS */;
/*!40000 ALTER TABLE `likes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locations`
--
DROP TABLE IF EXISTS `locations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `locations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`address` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`lat` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`lng` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`status_message_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `locations`
--
LOCK TABLES `locations` WRITE;
/*!40000 ALTER TABLE `locations` DISABLE KEYS */;
/*!40000 ALTER TABLE `locations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mentions`
--
DROP TABLE IF EXISTS `mentions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mentions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`post_id` int(11) NOT NULL,
`person_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_mentions_on_person_id_and_post_id` (`person_id`,`post_id`) USING BTREE,
KEY `index_mentions_on_person_id` (`person_id`) USING BTREE,
KEY `index_mentions_on_post_id` (`post_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `mentions`
--
LOCK TABLES `mentions` WRITE;
/*!40000 ALTER TABLE `mentions` DISABLE KEYS */;
/*!40000 ALTER TABLE `mentions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `messages`
--
DROP TABLE IF EXISTS `messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`conversation_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`text` text COLLATE utf8mb4_bin NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`author_signature` text COLLATE utf8mb4_bin,
PRIMARY KEY (`id`),
UNIQUE KEY `index_messages_on_guid` (`guid`(191)) USING BTREE,
KEY `index_messages_on_author_id` (`author_id`) USING BTREE,
KEY `messages_conversation_id_fk` (`conversation_id`) USING BTREE,
CONSTRAINT `messages_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE,
CONSTRAINT `messages_conversation_id_fk` FOREIGN KEY (`conversation_id`) REFERENCES `conversations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `messages`
--
LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `notification_actors`
--
DROP TABLE IF EXISTS `notification_actors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notification_actors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notification_id` int(11) DEFAULT NULL,
`person_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_notification_actors_on_notification_id_and_person_id` (`notification_id`,`person_id`) USING BTREE,
KEY `index_notification_actors_on_notification_id` (`notification_id`) USING BTREE,
KEY `index_notification_actors_on_person_id` (`person_id`) USING BTREE,
CONSTRAINT `notification_actors_notification_id_fk` FOREIGN KEY (`notification_id`) REFERENCES `notifications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `notification_actors`
--
LOCK TABLES `notification_actors` WRITE;
/*!40000 ALTER TABLE `notification_actors` DISABLE KEYS */;
/*!40000 ALTER TABLE `notification_actors` 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,
`target_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`target_id` int(11) DEFAULT NULL,
`recipient_id` int(11) NOT NULL,
`unread` tinyint(1) NOT NULL DEFAULT '1',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_notifications_on_recipient_id` (`recipient_id`) USING BTREE,
KEY `index_notifications_on_target_id` (`target_id`) USING BTREE,
KEY `index_notifications_on_target_type_and_target_id` (`target_type`(190),`target_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `notifications`
--
LOCK TABLES `notifications` WRITE;
/*!40000 ALTER TABLE `notifications` DISABLE KEYS */;
/*!40000 ALTER TABLE `notifications` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `o_auth_access_tokens`
--
DROP TABLE IF EXISTS `o_auth_access_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `o_auth_access_tokens` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`authorization_id` int(11) DEFAULT NULL,
`token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`expires_at` datetime DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_o_auth_access_tokens_on_token` (`token`(191)) USING BTREE,
KEY `index_o_auth_access_tokens_on_authorization_id` (`authorization_id`) USING BTREE,
CONSTRAINT `fk_rails_5debabcff3` FOREIGN KEY (`authorization_id`) REFERENCES `authorizations` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `o_auth_access_tokens`
--
LOCK TABLES `o_auth_access_tokens` WRITE;
/*!40000 ALTER TABLE `o_auth_access_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `o_auth_access_tokens` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `o_auth_applications`
--
DROP TABLE IF EXISTS `o_auth_applications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `o_auth_applications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`client_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`client_secret` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`client_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`redirect_uris` text COLLATE utf8mb4_bin,
`response_types` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`grant_types` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`application_type` varchar(255) COLLATE utf8mb4_bin DEFAULT 'web',
`contacts` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`logo_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`client_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`policy_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`tos_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`sector_identifier_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`token_endpoint_auth_method` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`jwks` text COLLATE utf8mb4_bin,
`jwks_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`ppid` tinyint(1) DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_o_auth_applications_on_client_id` (`client_id`(191)) USING BTREE,
KEY `index_o_auth_applications_on_user_id` (`user_id`) USING BTREE,
CONSTRAINT `fk_rails_ad75323da2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `o_auth_applications`
--
LOCK TABLES `o_auth_applications` WRITE;
/*!40000 ALTER TABLE `o_auth_applications` DISABLE KEYS */;
/*!40000 ALTER TABLE `o_auth_applications` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `o_embed_caches`
--
DROP TABLE IF EXISTS `o_embed_caches`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `o_embed_caches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(1024) COLLATE utf8mb4_bin NOT NULL,
`data` text COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `index_o_embed_caches_on_url` (`url`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `o_embed_caches`
--
LOCK TABLES `o_embed_caches` WRITE;
/*!40000 ALTER TABLE `o_embed_caches` DISABLE KEYS */;
/*!40000 ALTER TABLE `o_embed_caches` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `open_graph_caches`
--
DROP TABLE IF EXISTS `open_graph_caches`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `open_graph_caches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`ob_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`image` text COLLATE utf8mb4_bin,
`url` text COLLATE utf8mb4_bin,
`description` text COLLATE utf8mb4_bin,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `open_graph_caches`
--
LOCK TABLES `open_graph_caches` WRITE;
/*!40000 ALTER TABLE `open_graph_caches` DISABLE KEYS */;
/*!40000 ALTER TABLE `open_graph_caches` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `participations`
--
DROP TABLE IF EXISTS `participations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `participations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`target_id` int(11) DEFAULT NULL,
`target_type` varchar(60) COLLATE utf8mb4_bin NOT NULL,
`author_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`count` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `index_participations_on_target_id_and_target_type_and_author_id` (`target_id`,`target_type`,`author_id`) USING BTREE,
KEY `index_participations_on_author_id` (`author_id`) USING BTREE,
KEY `index_participations_on_guid` (`guid`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `participations`
--
LOCK TABLES `participations` WRITE;
/*!40000 ALTER TABLE `participations` DISABLE KEYS */;
/*!40000 ALTER TABLE `participations` 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,
`guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`diaspora_handle` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`serialized_public_key` text COLLATE utf8mb4_bin NOT NULL,
`owner_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`closed_account` tinyint(1) DEFAULT '0',
`fetch_status` int(11) DEFAULT '0',
`pod_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_people_on_diaspora_handle` (`diaspora_handle`(191)) USING BTREE,
UNIQUE KEY `index_people_on_guid` (`guid`(191)) USING BTREE,
UNIQUE KEY `index_people_on_owner_id` (`owner_id`) USING BTREE,
KEY `people_pod_id_fk` (`pod_id`) USING BTREE,
CONSTRAINT `people_pod_id_fk` FOREIGN KEY (`pod_id`) REFERENCES `pods` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `people`
--
LOCK TABLES `people` WRITE;
/*!40000 ALTER TABLE `people` DISABLE KEYS */;
/*!40000 ALTER TABLE `people` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `photos`
--
DROP TABLE IF EXISTS `photos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `photos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`author_id` int(11) NOT NULL,
`public` tinyint(1) NOT NULL DEFAULT '0',
`guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`pending` tinyint(1) NOT NULL DEFAULT '0',
`text` text COLLATE utf8mb4_bin,
`remote_photo_path` text COLLATE utf8mb4_bin,
`remote_photo_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`random_string` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`processed_image` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`unprocessed_image` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`status_message_guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`comments_count` int(11) DEFAULT NULL,
`height` int(11) DEFAULT NULL,
`width` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_photos_on_guid` (`guid`(191)) USING BTREE,
KEY `index_photos_on_status_message_guid` (`status_message_guid`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `photos`
--
LOCK TABLES `photos` WRITE;
/*!40000 ALTER TABLE `photos` DISABLE KEYS */;
/*!40000 ALTER TABLE `photos` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pods`
--
DROP TABLE IF EXISTS `pods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`host` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`ssl` tinyint(1) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`status` int(11) DEFAULT '0',
`checked_at` datetime DEFAULT '1970-01-01 00:00:00',
`offline_since` datetime DEFAULT NULL,
`response_time` int(11) DEFAULT '-1',
`software` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`error` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`port` int(11) DEFAULT NULL,
`blocked` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `index_pods_on_host_and_port` (`host`(190),`port`) USING BTREE,
KEY `index_pods_on_checked_at` (`checked_at`) USING BTREE,
KEY `index_pods_on_offline_since` (`offline_since`) USING BTREE,
KEY `index_pods_on_status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pods`
--
LOCK TABLES `pods` WRITE;
/*!40000 ALTER TABLE `pods` DISABLE KEYS */;
/*!40000 ALTER TABLE `pods` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `poll_answers`
--
DROP TABLE IF EXISTS `poll_answers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `poll_answers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`answer` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`poll_id` int(11) NOT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`vote_count` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `index_poll_answers_on_guid` (`guid`(191)) USING BTREE,
KEY `index_poll_answers_on_poll_id` (`poll_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `poll_answers`
--
LOCK TABLES `poll_answers` WRITE;
/*!40000 ALTER TABLE `poll_answers` DISABLE KEYS */;
/*!40000 ALTER TABLE `poll_answers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `poll_participation_signatures`
--
DROP TABLE IF EXISTS `poll_participation_signatures`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `poll_participation_signatures` (
`poll_participation_id` int(11) NOT NULL,
`author_signature` text COLLATE utf8mb4_bin NOT NULL,
`signature_order_id` int(11) NOT NULL,
`additional_data` text COLLATE utf8mb4_bin,
UNIQUE KEY `index_poll_participation_signatures_on_poll_participation_id` (`poll_participation_id`) USING BTREE,
KEY `poll_participation_signatures_signature_orders_id_fk` (`signature_order_id`) USING BTREE,
CONSTRAINT `poll_participation_signatures_poll_participation_id_fk` FOREIGN KEY (`poll_participation_id`) REFERENCES `poll_participations` (`id`) ON DELETE CASCADE,
CONSTRAINT `poll_participation_signatures_signature_orders_id_fk` FOREIGN KEY (`signature_order_id`) REFERENCES `signature_orders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `poll_participation_signatures`
--
LOCK TABLES `poll_participation_signatures` WRITE;
/*!40000 ALTER TABLE `poll_participation_signatures` DISABLE KEYS */;
/*!40000 ALTER TABLE `poll_participation_signatures` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `poll_participations`
--
DROP TABLE IF EXISTS `poll_participations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `poll_participations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`poll_answer_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`poll_id` int(11) NOT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_poll_participations_on_guid` (`guid`(191)) USING BTREE,
KEY `index_poll_participations_on_poll_id` (`poll_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `poll_participations`
--
LOCK TABLES `poll_participations` WRITE;
/*!40000 ALTER TABLE `poll_participations` DISABLE KEYS */;
/*!40000 ALTER TABLE `poll_participations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `polls`
--
DROP TABLE IF EXISTS `polls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `polls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`question` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`status_message_id` int(11) NOT NULL,
`status` tinyint(1) DEFAULT NULL,
`guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_polls_on_guid` (`guid`(191)) USING BTREE,
KEY `index_polls_on_status_message_id` (`status_message_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `polls`
--
LOCK TABLES `polls` WRITE;
/*!40000 ALTER TABLE `polls` DISABLE KEYS */;
/*!40000 ALTER TABLE `polls` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `posts`
--
DROP TABLE IF EXISTS `posts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`author_id` int(11) NOT NULL,
`public` tinyint(1) NOT NULL DEFAULT '0',
`guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`type` varchar(40) COLLATE utf8mb4_bin NOT NULL,
`text` text COLLATE utf8mb4_bin,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`provider_display_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`root_guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`likes_count` int(11) DEFAULT '0',
`comments_count` int(11) DEFAULT '0',
`o_embed_cache_id` int(11) DEFAULT NULL,
`reshares_count` int(11) DEFAULT '0',
`interacted_at` datetime DEFAULT NULL,
`facebook_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`tweet_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`open_graph_cache_id` int(11) DEFAULT NULL,
`tumblr_ids` text COLLATE utf8mb4_bin,
PRIMARY KEY (`id`),
UNIQUE KEY `index_posts_on_guid` (`guid`(191)) USING BTREE,
UNIQUE KEY `index_posts_on_author_id_and_root_guid` (`author_id`,`root_guid`(190)) USING BTREE,
KEY `index_posts_on_person_id` (`author_id`) USING BTREE,
KEY `index_posts_on_id_and_type_and_created_at` (`id`,`type`,`created_at`) USING BTREE,
KEY `index_posts_on_id_and_type` (`id`,`type`) USING BTREE,
KEY `index_posts_on_root_guid` (`root_guid`(191)) USING BTREE,
KEY `index_posts_on_tweet_id` (`tweet_id`(191)) USING BTREE,
CONSTRAINT `posts_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `posts`
--
LOCK TABLES `posts` WRITE;
/*!40000 ALTER TABLE `posts` DISABLE KEYS */;
/*!40000 ALTER TABLE `posts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ppid`
--
DROP TABLE IF EXISTS `ppid`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ppid` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`o_auth_application_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`guid` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
`string` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
`identifier` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_ppid_on_o_auth_application_id` (`o_auth_application_id`) USING BTREE,
KEY `index_ppid_on_user_id` (`user_id`) USING BTREE,
CONSTRAINT `fk_rails_150457f962` FOREIGN KEY (`o_auth_application_id`) REFERENCES `o_auth_applications` (`id`),
CONSTRAINT `fk_rails_e6b8e5264f` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ppid`
--
LOCK TABLES `ppid` WRITE;
/*!40000 ALTER TABLE `ppid` DISABLE KEYS */;
/*!40000 ALTER TABLE `ppid` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `profiles`
--
DROP TABLE IF EXISTS `profiles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`diaspora_handle` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`first_name` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
`last_name` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
`image_url` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`image_url_small` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`image_url_medium` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`birthday` date DEFAULT NULL,
`gender` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`bio` text COLLATE utf8mb4_bin,
`searchable` tinyint(1) NOT NULL DEFAULT '1',
`person_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`location` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`full_name` varchar(70) COLLATE utf8mb4_bin DEFAULT NULL,
`nsfw` tinyint(1) DEFAULT '0',
`public_details` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `index_profiles_on_full_name_and_searchable` (`full_name`,`searchable`) USING BTREE,
KEY `index_profiles_on_full_name` (`full_name`) USING BTREE,
KEY `index_profiles_on_person_id` (`person_id`) USING BTREE,
CONSTRAINT `profiles_person_id_fk` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `profiles`
--
LOCK TABLES `profiles` WRITE;
/*!40000 ALTER TABLE `profiles` DISABLE KEYS */;
/*!40000 ALTER TABLE `profiles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `rails_admin_histories`
--
DROP TABLE IF EXISTS `rails_admin_histories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rails_admin_histories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` text COLLATE utf8mb4_bin,
`username` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`item` int(11) DEFAULT NULL,
`table` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`month` smallint(6) DEFAULT NULL,
`year` bigint(20) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `index_rails_admin_histories` (`item`,`table`(188),`month`,`year`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `rails_admin_histories`
--
LOCK TABLES `rails_admin_histories` WRITE;
/*!40000 ALTER TABLE `rails_admin_histories` DISABLE KEYS */;
/*!40000 ALTER TABLE `rails_admin_histories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reports`
--
DROP TABLE IF EXISTS `reports`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reports` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`item_id` int(11) NOT NULL,
`item_type` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`reviewed` tinyint(1) DEFAULT '0',
`text` text COLLATE utf8mb4_bin,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `index_reports_on_item_id` (`item_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `reports`
--
LOCK TABLES `reports` WRITE;
/*!40000 ALTER TABLE `reports` DISABLE KEYS */;
/*!40000 ALTER TABLE `reports` 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,
`person_id` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `roles`
--
LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `schema_migrations`
--
DROP TABLE IF EXISTS `schema_migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schema_migrations` (
`version` varchar(191) COLLATE utf8mb4_bin NOT NULL,
UNIQUE KEY `unique_schema_migrations` (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `schema_migrations`
--
LOCK TABLES `schema_migrations` WRITE;
/*!40000 ALTER TABLE `schema_migrations` DISABLE KEYS */;
INSERT INTO `schema_migrations` VALUES ('0'),('20130207231310'),('20130404211624'),('20130429073928'),('20130608171134'),('20130613203350'),('20130717104359'),('20130801063213'),('20131017093025'),('20131213171804'),('20140121132816'),('20140214104217'),('20140222162826'),('20140308154022'),('20140422134050'),('20140422134627'),('20140601102543'),('20140801101230'),('20140801101352'),('20140824230505'),('20140826165533'),('20140906192846'),('20141001162851'),('20141007003922'),('20141024170120'),('20141209041241'),('20141216213423'),('20141227120907'),('20141230214830'),('20150106050733'),('20150209230946'),('20150220001357'),('20150403192408'),('20150403212139'),('20150523004437'),('20150531005120'),('20150607143809'),('20150613202109'),('20150630221004'),('20150708153926'),('20150708153928'),('20150714055110'),('20150724152052'),('20150731123113'),('20150731123114'),('20150828132451'),('20151003142048'),('20151210213023'),('20160124234712'),('20160225232049'),('20160302025129'),('20160307142216'),('20160327103605'),('20160509232726'),('20160531170531'),('20160618033455'),('20160720212620'),('20160802212635'),('20160807212443'),('20160810230114'),('20160813115514'),('20160822212739');
/*!40000 ALTER TABLE `schema_migrations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `services`
--
DROP TABLE IF EXISTS `services`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `services` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(127) COLLATE utf8mb4_bin NOT NULL,
`user_id` int(11) NOT NULL,
`uid` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
`access_token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`access_secret` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`nickname` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `index_services_on_type_and_uid` (`type`(64),`uid`) USING BTREE,
KEY `index_services_on_user_id` (`user_id`) USING BTREE,
CONSTRAINT `services_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `services`
--
LOCK TABLES `services` WRITE;
/*!40000 ALTER TABLE `services` DISABLE KEYS */;
/*!40000 ALTER TABLE `services` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `share_visibilities`
--
DROP TABLE IF EXISTS `share_visibilities`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `share_visibilities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shareable_id` int(11) NOT NULL,
`hidden` tinyint(1) NOT NULL DEFAULT '0',
`shareable_type` varchar(60) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Post',
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `shareable_and_hidden_and_user_id` (`shareable_id`,`shareable_type`,`hidden`,`user_id`) USING BTREE,
KEY `shareable_and_user_id` (`shareable_id`,`shareable_type`,`user_id`) USING BTREE,
KEY `index_post_visibilities_on_post_id` (`shareable_id`) USING BTREE,
KEY `index_share_visibilities_on_user_id` (`user_id`) USING BTREE,
CONSTRAINT `share_visibilities_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `share_visibilities`
--
LOCK TABLES `share_visibilities` WRITE;
/*!40000 ALTER TABLE `share_visibilities` DISABLE KEYS */;
/*!40000 ALTER TABLE `share_visibilities` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `signature_orders`
--
DROP TABLE IF EXISTS `signature_orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `signature_orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order` varchar(255) COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_signature_orders_on_order` (`order`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `signature_orders`
--
LOCK TABLES `signature_orders` WRITE;
/*!40000 ALTER TABLE `signature_orders` DISABLE KEYS */;
/*!40000 ALTER TABLE `signature_orders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `simple_captcha_data`
--
DROP TABLE IF EXISTS `simple_captcha_data`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `simple_captcha_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`key` varchar(40) COLLATE utf8mb4_bin DEFAULT NULL,
`value` varchar(12) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_key` (`key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `simple_captcha_data`
--
LOCK TABLES `simple_captcha_data` WRITE;
/*!40000 ALTER TABLE `simple_captcha_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `simple_captcha_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tag_followings`
--
DROP TABLE IF EXISTS `tag_followings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tag_followings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_tag_followings_on_tag_id_and_user_id` (`tag_id`,`user_id`) USING BTREE,
KEY `index_tag_followings_on_tag_id` (`tag_id`) USING BTREE,
KEY `index_tag_followings_on_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tag_followings`
--
LOCK TABLES `tag_followings` WRITE;
/*!40000 ALTER TABLE `tag_followings` DISABLE KEYS */;
/*!40000 ALTER TABLE `tag_followings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `taggings`
--
DROP TABLE IF EXISTS `taggings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taggings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` int(11) DEFAULT NULL,
`taggable_id` int(11) DEFAULT NULL,
`taggable_type` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
`tagger_id` int(11) DEFAULT NULL,
`tagger_type` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
`context` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_taggings_uniquely` (`taggable_id`,`taggable_type`,`tag_id`) USING BTREE,
KEY `index_taggings_on_created_at` (`created_at`) USING BTREE,
KEY `index_taggings_on_tag_id` (`tag_id`) USING BTREE,
KEY `index_taggings_on_taggable_id_and_taggable_type_and_context` (`taggable_id`,`taggable_type`(95),`context`(95)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `taggings`
--
LOCK TABLES `taggings` WRITE;
/*!40000 ALTER TABLE `taggings` DISABLE KEYS */;
/*!40000 ALTER TABLE `taggings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tags`
--
DROP TABLE IF EXISTS `tags`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`taggings_count` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `index_tags_on_name` (`name`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tags`
--
LOCK TABLES `tags` WRITE;
/*!40000 ALTER TABLE `tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `tags` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_preferences`
--
DROP TABLE IF EXISTS `user_preferences`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_preferences` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_preferences`
--
LOCK TABLES `user_preferences` WRITE;
/*!40000 ALTER TABLE `user_preferences` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_preferences` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`serialized_private_key` text COLLATE utf8mb4_bin,
`getting_started` tinyint(1) NOT NULL DEFAULT '1',
`disable_mail` tinyint(1) NOT NULL DEFAULT '0',
`language` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`email` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`encrypted_password` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`reset_password_token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`remember_created_at` datetime DEFAULT NULL,
`sign_in_count` int(11) DEFAULT '0',
`current_sign_in_at` datetime DEFAULT NULL,
`last_sign_in_at` datetime DEFAULT NULL,
`current_sign_in_ip` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`last_sign_in_ip` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`invited_by_id` int(11) DEFAULT NULL,
`authentication_token` varchar(30) COLLATE utf8mb4_bin DEFAULT NULL,
`unconfirmed_email` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`confirm_email_token` varchar(30) COLLATE utf8mb4_bin DEFAULT NULL,
`locked_at` datetime DEFAULT NULL,
`show_community_spotlight_in_stream` tinyint(1) NOT NULL DEFAULT '1',
`auto_follow_back` tinyint(1) DEFAULT '0',
`auto_follow_back_aspect_id` int(11) DEFAULT NULL,
`hidden_shareables` text COLLATE utf8mb4_bin,
`reset_password_sent_at` datetime DEFAULT NULL,
`last_seen` datetime DEFAULT NULL,
`remove_after` datetime DEFAULT NULL,
`export` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`exported_at` datetime DEFAULT NULL,
`exporting` tinyint(1) DEFAULT '0',
`strip_exif` tinyint(1) DEFAULT '1',
`exported_photos_file` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`exported_photos_at` datetime DEFAULT NULL,
`exporting_photos` tinyint(1) DEFAULT '0',
`color_theme` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_users_on_email` (`email`(191)) USING BTREE,
UNIQUE KEY `index_users_on_username` (`username`(191)) USING BTREE,
UNIQUE KEY `index_users_on_authentication_token` (`authentication_token`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users` 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-10-02 11:57:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment