· 9 years ago · Oct 02, 2016, 03:32 PM
1-- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64)
2--
3-- Host: localhost Database: diaspora_production
4-- ------------------------------------------------------
5-- Server version 5.7.15-0ubuntu0.16.04.1
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `account_deletions`
20--
21
22DROP TABLE IF EXISTS `account_deletions`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `account_deletions` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `diaspora_handle` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
28 `person_id` int(11) DEFAULT NULL,
29 `completed_at` datetime DEFAULT NULL,
30 PRIMARY KEY (`id`)
31) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
32/*!40101 SET character_set_client = @saved_cs_client */;
33
34--
35-- Dumping data for table `account_deletions`
36--
37
38LOCK TABLES `account_deletions` WRITE;
39/*!40000 ALTER TABLE `account_deletions` DISABLE KEYS */;
40/*!40000 ALTER TABLE `account_deletions` ENABLE KEYS */;
41UNLOCK TABLES;
42
43--
44-- Table structure for table `aspect_memberships`
45--
46
47DROP TABLE IF EXISTS `aspect_memberships`;
48/*!40101 SET @saved_cs_client = @@character_set_client */;
49/*!40101 SET character_set_client = utf8 */;
50CREATE TABLE `aspect_memberships` (
51 `id` int(11) NOT NULL AUTO_INCREMENT,
52 `aspect_id` int(11) NOT NULL,
53 `contact_id` int(11) NOT NULL,
54 `created_at` datetime NOT NULL,
55 `updated_at` datetime NOT NULL,
56 PRIMARY KEY (`id`),
57 UNIQUE KEY `index_aspect_memberships_on_aspect_id_and_contact_id` (`aspect_id`,`contact_id`) USING BTREE,
58 KEY `index_aspect_memberships_on_aspect_id` (`aspect_id`) USING BTREE,
59 KEY `index_aspect_memberships_on_contact_id` (`contact_id`) USING BTREE,
60 CONSTRAINT `aspect_memberships_aspect_id_fk` FOREIGN KEY (`aspect_id`) REFERENCES `aspects` (`id`) ON DELETE CASCADE,
61 CONSTRAINT `aspect_memberships_contact_id_fk` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE
62) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
63/*!40101 SET character_set_client = @saved_cs_client */;
64
65--
66-- Dumping data for table `aspect_memberships`
67--
68
69LOCK TABLES `aspect_memberships` WRITE;
70/*!40000 ALTER TABLE `aspect_memberships` DISABLE KEYS */;
71/*!40000 ALTER TABLE `aspect_memberships` ENABLE KEYS */;
72UNLOCK TABLES;
73
74--
75-- Table structure for table `aspect_visibilities`
76--
77
78DROP TABLE IF EXISTS `aspect_visibilities`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80/*!40101 SET character_set_client = utf8 */;
81CREATE TABLE `aspect_visibilities` (
82 `id` int(11) NOT NULL AUTO_INCREMENT,
83 `shareable_id` int(11) NOT NULL,
84 `aspect_id` int(11) NOT NULL,
85 `shareable_type` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Post',
86 PRIMARY KEY (`id`),
87 KEY `index_aspect_visibilities_on_aspect_id` (`aspect_id`) USING BTREE,
88 KEY `shareable_and_aspect_id` (`shareable_id`,`shareable_type`(189),`aspect_id`) USING BTREE,
89 KEY `index_aspect_visibilities_on_shareable_id_and_shareable_type` (`shareable_id`,`shareable_type`(190)) USING BTREE,
90 CONSTRAINT `aspect_visibilities_aspect_id_fk` FOREIGN KEY (`aspect_id`) REFERENCES `aspects` (`id`) ON DELETE CASCADE
91) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
92/*!40101 SET character_set_client = @saved_cs_client */;
93
94--
95-- Dumping data for table `aspect_visibilities`
96--
97
98LOCK TABLES `aspect_visibilities` WRITE;
99/*!40000 ALTER TABLE `aspect_visibilities` DISABLE KEYS */;
100/*!40000 ALTER TABLE `aspect_visibilities` ENABLE KEYS */;
101UNLOCK TABLES;
102
103--
104-- Table structure for table `aspects`
105--
106
107DROP TABLE IF EXISTS `aspects`;
108/*!40101 SET @saved_cs_client = @@character_set_client */;
109/*!40101 SET character_set_client = utf8 */;
110CREATE TABLE `aspects` (
111 `id` int(11) NOT NULL AUTO_INCREMENT,
112 `name` varchar(255) COLLATE utf8mb4_bin NOT NULL,
113 `user_id` int(11) NOT NULL,
114 `created_at` datetime NOT NULL,
115 `updated_at` datetime NOT NULL,
116 `contacts_visible` tinyint(1) NOT NULL DEFAULT '1',
117 `order_id` int(11) DEFAULT NULL,
118 `chat_enabled` tinyint(1) DEFAULT '0',
119 PRIMARY KEY (`id`),
120 KEY `index_aspects_on_user_id_and_contacts_visible` (`user_id`,`contacts_visible`) USING BTREE,
121 KEY `index_aspects_on_user_id` (`user_id`) USING BTREE
122) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
123/*!40101 SET character_set_client = @saved_cs_client */;
124
125--
126-- Dumping data for table `aspects`
127--
128
129LOCK TABLES `aspects` WRITE;
130/*!40000 ALTER TABLE `aspects` DISABLE KEYS */;
131/*!40000 ALTER TABLE `aspects` ENABLE KEYS */;
132UNLOCK TABLES;
133
134--
135-- Table structure for table `authorizations`
136--
137
138DROP TABLE IF EXISTS `authorizations`;
139/*!40101 SET @saved_cs_client = @@character_set_client */;
140/*!40101 SET character_set_client = utf8 */;
141CREATE TABLE `authorizations` (
142 `id` int(11) NOT NULL AUTO_INCREMENT,
143 `user_id` int(11) DEFAULT NULL,
144 `o_auth_application_id` int(11) DEFAULT NULL,
145 `refresh_token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
146 `code` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
147 `redirect_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
148 `nonce` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
149 `scopes` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
150 `code_used` tinyint(1) DEFAULT '0',
151 `created_at` datetime NOT NULL,
152 `updated_at` datetime NOT NULL,
153 PRIMARY KEY (`id`),
154 KEY `index_authorizations_on_o_auth_application_id` (`o_auth_application_id`) USING BTREE,
155 KEY `index_authorizations_on_user_id` (`user_id`) USING BTREE,
156 CONSTRAINT `fk_rails_4ecef5b8c5` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
157 CONSTRAINT `fk_rails_e166644de5` FOREIGN KEY (`o_auth_application_id`) REFERENCES `o_auth_applications` (`id`)
158) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
159/*!40101 SET character_set_client = @saved_cs_client */;
160
161--
162-- Dumping data for table `authorizations`
163--
164
165LOCK TABLES `authorizations` WRITE;
166/*!40000 ALTER TABLE `authorizations` DISABLE KEYS */;
167/*!40000 ALTER TABLE `authorizations` ENABLE KEYS */;
168UNLOCK TABLES;
169
170--
171-- Table structure for table `blocks`
172--
173
174DROP TABLE IF EXISTS `blocks`;
175/*!40101 SET @saved_cs_client = @@character_set_client */;
176/*!40101 SET character_set_client = utf8 */;
177CREATE TABLE `blocks` (
178 `id` int(11) NOT NULL AUTO_INCREMENT,
179 `user_id` int(11) DEFAULT NULL,
180 `person_id` int(11) DEFAULT NULL,
181 PRIMARY KEY (`id`)
182) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
183/*!40101 SET character_set_client = @saved_cs_client */;
184
185--
186-- Dumping data for table `blocks`
187--
188
189LOCK TABLES `blocks` WRITE;
190/*!40000 ALTER TABLE `blocks` DISABLE KEYS */;
191/*!40000 ALTER TABLE `blocks` ENABLE KEYS */;
192UNLOCK TABLES;
193
194--
195-- Table structure for table `chat_contacts`
196--
197
198DROP TABLE IF EXISTS `chat_contacts`;
199/*!40101 SET @saved_cs_client = @@character_set_client */;
200/*!40101 SET character_set_client = utf8 */;
201CREATE TABLE `chat_contacts` (
202 `id` int(11) NOT NULL AUTO_INCREMENT,
203 `user_id` int(11) NOT NULL,
204 `jid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
205 `name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
206 `ask` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL,
207 `subscription` varchar(128) COLLATE utf8mb4_bin NOT NULL,
208 PRIMARY KEY (`id`),
209 UNIQUE KEY `index_chat_contacts_on_user_id_and_jid` (`user_id`,`jid`(190)) USING BTREE
210) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
211/*!40101 SET character_set_client = @saved_cs_client */;
212
213--
214-- Dumping data for table `chat_contacts`
215--
216
217LOCK TABLES `chat_contacts` WRITE;
218/*!40000 ALTER TABLE `chat_contacts` DISABLE KEYS */;
219/*!40000 ALTER TABLE `chat_contacts` ENABLE KEYS */;
220UNLOCK TABLES;
221
222--
223-- Table structure for table `chat_fragments`
224--
225
226DROP TABLE IF EXISTS `chat_fragments`;
227/*!40101 SET @saved_cs_client = @@character_set_client */;
228/*!40101 SET character_set_client = utf8 */;
229CREATE TABLE `chat_fragments` (
230 `id` int(11) NOT NULL AUTO_INCREMENT,
231 `user_id` int(11) NOT NULL,
232 `root` varchar(256) COLLATE utf8mb4_bin NOT NULL,
233 `namespace` varchar(256) COLLATE utf8mb4_bin NOT NULL,
234 `xml` text COLLATE utf8mb4_bin NOT NULL,
235 PRIMARY KEY (`id`),
236 UNIQUE KEY `index_chat_fragments_on_user_id` (`user_id`) USING BTREE
237) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
238/*!40101 SET character_set_client = @saved_cs_client */;
239
240--
241-- Dumping data for table `chat_fragments`
242--
243
244LOCK TABLES `chat_fragments` WRITE;
245/*!40000 ALTER TABLE `chat_fragments` DISABLE KEYS */;
246/*!40000 ALTER TABLE `chat_fragments` ENABLE KEYS */;
247UNLOCK TABLES;
248
249--
250-- Table structure for table `chat_offline_messages`
251--
252
253DROP TABLE IF EXISTS `chat_offline_messages`;
254/*!40101 SET @saved_cs_client = @@character_set_client */;
255/*!40101 SET character_set_client = utf8 */;
256CREATE TABLE `chat_offline_messages` (
257 `id` int(11) NOT NULL AUTO_INCREMENT,
258 `from` varchar(255) COLLATE utf8mb4_bin NOT NULL,
259 `to` varchar(255) COLLATE utf8mb4_bin NOT NULL,
260 `message` text COLLATE utf8mb4_bin NOT NULL,
261 `created_at` datetime NOT NULL,
262 PRIMARY KEY (`id`)
263) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
264/*!40101 SET character_set_client = @saved_cs_client */;
265
266--
267-- Dumping data for table `chat_offline_messages`
268--
269
270LOCK TABLES `chat_offline_messages` WRITE;
271/*!40000 ALTER TABLE `chat_offline_messages` DISABLE KEYS */;
272/*!40000 ALTER TABLE `chat_offline_messages` ENABLE KEYS */;
273UNLOCK TABLES;
274
275--
276-- Table structure for table `comment_signatures`
277--
278
279DROP TABLE IF EXISTS `comment_signatures`;
280/*!40101 SET @saved_cs_client = @@character_set_client */;
281/*!40101 SET character_set_client = utf8 */;
282CREATE TABLE `comment_signatures` (
283 `comment_id` int(11) NOT NULL,
284 `author_signature` text COLLATE utf8mb4_bin NOT NULL,
285 `signature_order_id` int(11) NOT NULL,
286 `additional_data` text COLLATE utf8mb4_bin,
287 UNIQUE KEY `index_comment_signatures_on_comment_id` (`comment_id`) USING BTREE,
288 KEY `comment_signatures_signature_orders_id_fk` (`signature_order_id`) USING BTREE,
289 CONSTRAINT `comment_signatures_comment_id_fk` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE,
290 CONSTRAINT `comment_signatures_signature_orders_id_fk` FOREIGN KEY (`signature_order_id`) REFERENCES `signature_orders` (`id`)
291) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
292/*!40101 SET character_set_client = @saved_cs_client */;
293
294--
295-- Dumping data for table `comment_signatures`
296--
297
298LOCK TABLES `comment_signatures` WRITE;
299/*!40000 ALTER TABLE `comment_signatures` DISABLE KEYS */;
300/*!40000 ALTER TABLE `comment_signatures` ENABLE KEYS */;
301UNLOCK TABLES;
302
303--
304-- Table structure for table `comments`
305--
306
307DROP TABLE IF EXISTS `comments`;
308/*!40101 SET @saved_cs_client = @@character_set_client */;
309/*!40101 SET character_set_client = utf8 */;
310CREATE TABLE `comments` (
311 `id` int(11) NOT NULL AUTO_INCREMENT,
312 `text` text COLLATE utf8mb4_bin NOT NULL,
313 `commentable_id` int(11) NOT NULL,
314 `author_id` int(11) NOT NULL,
315 `guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
316 `created_at` datetime NOT NULL,
317 `updated_at` datetime NOT NULL,
318 `likes_count` int(11) NOT NULL DEFAULT '0',
319 `commentable_type` varchar(60) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Post',
320 PRIMARY KEY (`id`),
321 UNIQUE KEY `index_comments_on_guid` (`guid`(191)) USING BTREE,
322 KEY `index_comments_on_person_id` (`author_id`) USING BTREE,
323 KEY `index_comments_on_commentable_id_and_commentable_type` (`commentable_id`,`commentable_type`) USING BTREE,
324 CONSTRAINT `comments_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
325) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
326/*!40101 SET character_set_client = @saved_cs_client */;
327
328--
329-- Dumping data for table `comments`
330--
331
332LOCK TABLES `comments` WRITE;
333/*!40000 ALTER TABLE `comments` DISABLE KEYS */;
334/*!40000 ALTER TABLE `comments` ENABLE KEYS */;
335UNLOCK TABLES;
336
337--
338-- Table structure for table `contacts`
339--
340
341DROP TABLE IF EXISTS `contacts`;
342/*!40101 SET @saved_cs_client = @@character_set_client */;
343/*!40101 SET character_set_client = utf8 */;
344CREATE TABLE `contacts` (
345 `id` int(11) NOT NULL AUTO_INCREMENT,
346 `user_id` int(11) NOT NULL,
347 `person_id` int(11) NOT NULL,
348 `created_at` datetime NOT NULL,
349 `updated_at` datetime NOT NULL,
350 `sharing` tinyint(1) NOT NULL DEFAULT '0',
351 `receiving` tinyint(1) NOT NULL DEFAULT '0',
352 PRIMARY KEY (`id`),
353 UNIQUE KEY `index_contacts_on_user_id_and_person_id` (`user_id`,`person_id`) USING BTREE,
354 KEY `index_contacts_on_person_id` (`person_id`) USING BTREE,
355 CONSTRAINT `contacts_person_id_fk` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
356) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
357/*!40101 SET character_set_client = @saved_cs_client */;
358
359--
360-- Dumping data for table `contacts`
361--
362
363LOCK TABLES `contacts` WRITE;
364/*!40000 ALTER TABLE `contacts` DISABLE KEYS */;
365/*!40000 ALTER TABLE `contacts` ENABLE KEYS */;
366UNLOCK TABLES;
367
368--
369-- Table structure for table `conversation_visibilities`
370--
371
372DROP TABLE IF EXISTS `conversation_visibilities`;
373/*!40101 SET @saved_cs_client = @@character_set_client */;
374/*!40101 SET character_set_client = utf8 */;
375CREATE TABLE `conversation_visibilities` (
376 `id` int(11) NOT NULL AUTO_INCREMENT,
377 `conversation_id` int(11) NOT NULL,
378 `person_id` int(11) NOT NULL,
379 `unread` int(11) NOT NULL DEFAULT '0',
380 `created_at` datetime NOT NULL,
381 `updated_at` datetime NOT NULL,
382 PRIMARY KEY (`id`),
383 UNIQUE KEY `index_conversation_visibilities_usefully` (`conversation_id`,`person_id`) USING BTREE,
384 KEY `index_conversation_visibilities_on_conversation_id` (`conversation_id`) USING BTREE,
385 KEY `index_conversation_visibilities_on_person_id` (`person_id`) USING BTREE,
386 CONSTRAINT `conversation_visibilities_conversation_id_fk` FOREIGN KEY (`conversation_id`) REFERENCES `conversations` (`id`) ON DELETE CASCADE,
387 CONSTRAINT `conversation_visibilities_person_id_fk` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
388) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
389/*!40101 SET character_set_client = @saved_cs_client */;
390
391--
392-- Dumping data for table `conversation_visibilities`
393--
394
395LOCK TABLES `conversation_visibilities` WRITE;
396/*!40000 ALTER TABLE `conversation_visibilities` DISABLE KEYS */;
397/*!40000 ALTER TABLE `conversation_visibilities` ENABLE KEYS */;
398UNLOCK TABLES;
399
400--
401-- Table structure for table `conversations`
402--
403
404DROP TABLE IF EXISTS `conversations`;
405/*!40101 SET @saved_cs_client = @@character_set_client */;
406/*!40101 SET character_set_client = utf8 */;
407CREATE TABLE `conversations` (
408 `id` int(11) NOT NULL AUTO_INCREMENT,
409 `subject` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
410 `guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
411 `author_id` int(11) NOT NULL,
412 `created_at` datetime NOT NULL,
413 `updated_at` datetime NOT NULL,
414 PRIMARY KEY (`id`),
415 UNIQUE KEY `index_conversations_on_guid` (`guid`(191)) USING BTREE,
416 KEY `conversations_author_id_fk` (`author_id`) USING BTREE,
417 CONSTRAINT `conversations_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
418) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
419/*!40101 SET character_set_client = @saved_cs_client */;
420
421--
422-- Dumping data for table `conversations`
423--
424
425LOCK TABLES `conversations` WRITE;
426/*!40000 ALTER TABLE `conversations` DISABLE KEYS */;
427/*!40000 ALTER TABLE `conversations` ENABLE KEYS */;
428UNLOCK TABLES;
429
430--
431-- Table structure for table `invitation_codes`
432--
433
434DROP TABLE IF EXISTS `invitation_codes`;
435/*!40101 SET @saved_cs_client = @@character_set_client */;
436/*!40101 SET character_set_client = utf8 */;
437CREATE TABLE `invitation_codes` (
438 `id` int(11) NOT NULL AUTO_INCREMENT,
439 `token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
440 `user_id` int(11) DEFAULT NULL,
441 `count` int(11) DEFAULT NULL,
442 `created_at` datetime NOT NULL,
443 `updated_at` datetime NOT NULL,
444 PRIMARY KEY (`id`)
445) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
446/*!40101 SET character_set_client = @saved_cs_client */;
447
448--
449-- Dumping data for table `invitation_codes`
450--
451
452LOCK TABLES `invitation_codes` WRITE;
453/*!40000 ALTER TABLE `invitation_codes` DISABLE KEYS */;
454/*!40000 ALTER TABLE `invitation_codes` ENABLE KEYS */;
455UNLOCK TABLES;
456
457--
458-- Table structure for table `like_signatures`
459--
460
461DROP TABLE IF EXISTS `like_signatures`;
462/*!40101 SET @saved_cs_client = @@character_set_client */;
463/*!40101 SET character_set_client = utf8 */;
464CREATE TABLE `like_signatures` (
465 `like_id` int(11) NOT NULL,
466 `author_signature` text COLLATE utf8mb4_bin NOT NULL,
467 `signature_order_id` int(11) NOT NULL,
468 `additional_data` text COLLATE utf8mb4_bin,
469 UNIQUE KEY `index_like_signatures_on_like_id` (`like_id`) USING BTREE,
470 KEY `like_signatures_signature_orders_id_fk` (`signature_order_id`) USING BTREE,
471 CONSTRAINT `like_signatures_like_id_fk` FOREIGN KEY (`like_id`) REFERENCES `likes` (`id`) ON DELETE CASCADE,
472 CONSTRAINT `like_signatures_signature_orders_id_fk` FOREIGN KEY (`signature_order_id`) REFERENCES `signature_orders` (`id`)
473) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
474/*!40101 SET character_set_client = @saved_cs_client */;
475
476--
477-- Dumping data for table `like_signatures`
478--
479
480LOCK TABLES `like_signatures` WRITE;
481/*!40000 ALTER TABLE `like_signatures` DISABLE KEYS */;
482/*!40000 ALTER TABLE `like_signatures` ENABLE KEYS */;
483UNLOCK TABLES;
484
485--
486-- Table structure for table `likes`
487--
488
489DROP TABLE IF EXISTS `likes`;
490/*!40101 SET @saved_cs_client = @@character_set_client */;
491/*!40101 SET character_set_client = utf8 */;
492CREATE TABLE `likes` (
493 `id` int(11) NOT NULL AUTO_INCREMENT,
494 `positive` tinyint(1) DEFAULT '1',
495 `target_id` int(11) DEFAULT NULL,
496 `author_id` int(11) DEFAULT NULL,
497 `guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
498 `created_at` datetime NOT NULL,
499 `updated_at` datetime NOT NULL,
500 `target_type` varchar(60) COLLATE utf8mb4_bin NOT NULL,
501 PRIMARY KEY (`id`),
502 UNIQUE KEY `index_likes_on_target_id_and_author_id_and_target_type` (`target_id`,`author_id`,`target_type`) USING BTREE,
503 UNIQUE KEY `index_likes_on_guid` (`guid`(191)) USING BTREE,
504 KEY `likes_author_id_fk` (`author_id`) USING BTREE,
505 KEY `index_likes_on_post_id` (`target_id`) USING BTREE,
506 CONSTRAINT `likes_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
507) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
508/*!40101 SET character_set_client = @saved_cs_client */;
509
510--
511-- Dumping data for table `likes`
512--
513
514LOCK TABLES `likes` WRITE;
515/*!40000 ALTER TABLE `likes` DISABLE KEYS */;
516/*!40000 ALTER TABLE `likes` ENABLE KEYS */;
517UNLOCK TABLES;
518
519--
520-- Table structure for table `locations`
521--
522
523DROP TABLE IF EXISTS `locations`;
524/*!40101 SET @saved_cs_client = @@character_set_client */;
525/*!40101 SET character_set_client = utf8 */;
526CREATE TABLE `locations` (
527 `id` int(11) NOT NULL AUTO_INCREMENT,
528 `address` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
529 `lat` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
530 `lng` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
531 `status_message_id` int(11) DEFAULT NULL,
532 `created_at` datetime NOT NULL,
533 `updated_at` datetime NOT NULL,
534 PRIMARY KEY (`id`)
535) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
536/*!40101 SET character_set_client = @saved_cs_client */;
537
538--
539-- Dumping data for table `locations`
540--
541
542LOCK TABLES `locations` WRITE;
543/*!40000 ALTER TABLE `locations` DISABLE KEYS */;
544/*!40000 ALTER TABLE `locations` ENABLE KEYS */;
545UNLOCK TABLES;
546
547--
548-- Table structure for table `mentions`
549--
550
551DROP TABLE IF EXISTS `mentions`;
552/*!40101 SET @saved_cs_client = @@character_set_client */;
553/*!40101 SET character_set_client = utf8 */;
554CREATE TABLE `mentions` (
555 `id` int(11) NOT NULL AUTO_INCREMENT,
556 `post_id` int(11) NOT NULL,
557 `person_id` int(11) NOT NULL,
558 PRIMARY KEY (`id`),
559 UNIQUE KEY `index_mentions_on_person_id_and_post_id` (`person_id`,`post_id`) USING BTREE,
560 KEY `index_mentions_on_person_id` (`person_id`) USING BTREE,
561 KEY `index_mentions_on_post_id` (`post_id`) USING BTREE
562) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
563/*!40101 SET character_set_client = @saved_cs_client */;
564
565--
566-- Dumping data for table `mentions`
567--
568
569LOCK TABLES `mentions` WRITE;
570/*!40000 ALTER TABLE `mentions` DISABLE KEYS */;
571/*!40000 ALTER TABLE `mentions` ENABLE KEYS */;
572UNLOCK TABLES;
573
574--
575-- Table structure for table `messages`
576--
577
578DROP TABLE IF EXISTS `messages`;
579/*!40101 SET @saved_cs_client = @@character_set_client */;
580/*!40101 SET character_set_client = utf8 */;
581CREATE TABLE `messages` (
582 `id` int(11) NOT NULL AUTO_INCREMENT,
583 `conversation_id` int(11) NOT NULL,
584 `author_id` int(11) NOT NULL,
585 `guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
586 `text` text COLLATE utf8mb4_bin NOT NULL,
587 `created_at` datetime NOT NULL,
588 `updated_at` datetime NOT NULL,
589 `author_signature` text COLLATE utf8mb4_bin,
590 PRIMARY KEY (`id`),
591 UNIQUE KEY `index_messages_on_guid` (`guid`(191)) USING BTREE,
592 KEY `index_messages_on_author_id` (`author_id`) USING BTREE,
593 KEY `messages_conversation_id_fk` (`conversation_id`) USING BTREE,
594 CONSTRAINT `messages_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE,
595 CONSTRAINT `messages_conversation_id_fk` FOREIGN KEY (`conversation_id`) REFERENCES `conversations` (`id`) ON DELETE CASCADE
596) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
597/*!40101 SET character_set_client = @saved_cs_client */;
598
599--
600-- Dumping data for table `messages`
601--
602
603LOCK TABLES `messages` WRITE;
604/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
605/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
606UNLOCK TABLES;
607
608--
609-- Table structure for table `notification_actors`
610--
611
612DROP TABLE IF EXISTS `notification_actors`;
613/*!40101 SET @saved_cs_client = @@character_set_client */;
614/*!40101 SET character_set_client = utf8 */;
615CREATE TABLE `notification_actors` (
616 `id` int(11) NOT NULL AUTO_INCREMENT,
617 `notification_id` int(11) DEFAULT NULL,
618 `person_id` int(11) DEFAULT NULL,
619 `created_at` datetime NOT NULL,
620 `updated_at` datetime NOT NULL,
621 PRIMARY KEY (`id`),
622 UNIQUE KEY `index_notification_actors_on_notification_id_and_person_id` (`notification_id`,`person_id`) USING BTREE,
623 KEY `index_notification_actors_on_notification_id` (`notification_id`) USING BTREE,
624 KEY `index_notification_actors_on_person_id` (`person_id`) USING BTREE,
625 CONSTRAINT `notification_actors_notification_id_fk` FOREIGN KEY (`notification_id`) REFERENCES `notifications` (`id`) ON DELETE CASCADE
626) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
627/*!40101 SET character_set_client = @saved_cs_client */;
628
629--
630-- Dumping data for table `notification_actors`
631--
632
633LOCK TABLES `notification_actors` WRITE;
634/*!40000 ALTER TABLE `notification_actors` DISABLE KEYS */;
635/*!40000 ALTER TABLE `notification_actors` ENABLE KEYS */;
636UNLOCK TABLES;
637
638--
639-- Table structure for table `notifications`
640--
641
642DROP TABLE IF EXISTS `notifications`;
643/*!40101 SET @saved_cs_client = @@character_set_client */;
644/*!40101 SET character_set_client = utf8 */;
645CREATE TABLE `notifications` (
646 `id` int(11) NOT NULL AUTO_INCREMENT,
647 `target_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
648 `target_id` int(11) DEFAULT NULL,
649 `recipient_id` int(11) NOT NULL,
650 `unread` tinyint(1) NOT NULL DEFAULT '1',
651 `created_at` datetime NOT NULL,
652 `updated_at` datetime NOT NULL,
653 `type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
654 PRIMARY KEY (`id`),
655 KEY `index_notifications_on_recipient_id` (`recipient_id`) USING BTREE,
656 KEY `index_notifications_on_target_id` (`target_id`) USING BTREE,
657 KEY `index_notifications_on_target_type_and_target_id` (`target_type`(190),`target_id`) USING BTREE
658) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
659/*!40101 SET character_set_client = @saved_cs_client */;
660
661--
662-- Dumping data for table `notifications`
663--
664
665LOCK TABLES `notifications` WRITE;
666/*!40000 ALTER TABLE `notifications` DISABLE KEYS */;
667/*!40000 ALTER TABLE `notifications` ENABLE KEYS */;
668UNLOCK TABLES;
669
670--
671-- Table structure for table `o_auth_access_tokens`
672--
673
674DROP TABLE IF EXISTS `o_auth_access_tokens`;
675/*!40101 SET @saved_cs_client = @@character_set_client */;
676/*!40101 SET character_set_client = utf8 */;
677CREATE TABLE `o_auth_access_tokens` (
678 `id` int(11) NOT NULL AUTO_INCREMENT,
679 `authorization_id` int(11) DEFAULT NULL,
680 `token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
681 `expires_at` datetime DEFAULT NULL,
682 `created_at` datetime NOT NULL,
683 `updated_at` datetime NOT NULL,
684 PRIMARY KEY (`id`),
685 UNIQUE KEY `index_o_auth_access_tokens_on_token` (`token`(191)) USING BTREE,
686 KEY `index_o_auth_access_tokens_on_authorization_id` (`authorization_id`) USING BTREE,
687 CONSTRAINT `fk_rails_5debabcff3` FOREIGN KEY (`authorization_id`) REFERENCES `authorizations` (`id`)
688) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
689/*!40101 SET character_set_client = @saved_cs_client */;
690
691--
692-- Dumping data for table `o_auth_access_tokens`
693--
694
695LOCK TABLES `o_auth_access_tokens` WRITE;
696/*!40000 ALTER TABLE `o_auth_access_tokens` DISABLE KEYS */;
697/*!40000 ALTER TABLE `o_auth_access_tokens` ENABLE KEYS */;
698UNLOCK TABLES;
699
700--
701-- Table structure for table `o_auth_applications`
702--
703
704DROP TABLE IF EXISTS `o_auth_applications`;
705/*!40101 SET @saved_cs_client = @@character_set_client */;
706/*!40101 SET character_set_client = utf8 */;
707CREATE TABLE `o_auth_applications` (
708 `id` int(11) NOT NULL AUTO_INCREMENT,
709 `user_id` int(11) DEFAULT NULL,
710 `client_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
711 `client_secret` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
712 `client_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
713 `redirect_uris` text COLLATE utf8mb4_bin,
714 `response_types` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
715 `grant_types` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
716 `application_type` varchar(255) COLLATE utf8mb4_bin DEFAULT 'web',
717 `contacts` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
718 `logo_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
719 `client_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
720 `policy_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
721 `tos_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
722 `sector_identifier_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
723 `token_endpoint_auth_method` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
724 `jwks` text COLLATE utf8mb4_bin,
725 `jwks_uri` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
726 `ppid` tinyint(1) DEFAULT '0',
727 `created_at` datetime NOT NULL,
728 `updated_at` datetime NOT NULL,
729 PRIMARY KEY (`id`),
730 UNIQUE KEY `index_o_auth_applications_on_client_id` (`client_id`(191)) USING BTREE,
731 KEY `index_o_auth_applications_on_user_id` (`user_id`) USING BTREE,
732 CONSTRAINT `fk_rails_ad75323da2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
733) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
734/*!40101 SET character_set_client = @saved_cs_client */;
735
736--
737-- Dumping data for table `o_auth_applications`
738--
739
740LOCK TABLES `o_auth_applications` WRITE;
741/*!40000 ALTER TABLE `o_auth_applications` DISABLE KEYS */;
742/*!40000 ALTER TABLE `o_auth_applications` ENABLE KEYS */;
743UNLOCK TABLES;
744
745--
746-- Table structure for table `o_embed_caches`
747--
748
749DROP TABLE IF EXISTS `o_embed_caches`;
750/*!40101 SET @saved_cs_client = @@character_set_client */;
751/*!40101 SET character_set_client = utf8 */;
752CREATE TABLE `o_embed_caches` (
753 `id` int(11) NOT NULL AUTO_INCREMENT,
754 `url` varchar(1024) COLLATE utf8mb4_bin NOT NULL,
755 `data` text COLLATE utf8mb4_bin NOT NULL,
756 PRIMARY KEY (`id`),
757 KEY `index_o_embed_caches_on_url` (`url`(191)) USING BTREE
758) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
759/*!40101 SET character_set_client = @saved_cs_client */;
760
761--
762-- Dumping data for table `o_embed_caches`
763--
764
765LOCK TABLES `o_embed_caches` WRITE;
766/*!40000 ALTER TABLE `o_embed_caches` DISABLE KEYS */;
767/*!40000 ALTER TABLE `o_embed_caches` ENABLE KEYS */;
768UNLOCK TABLES;
769
770--
771-- Table structure for table `open_graph_caches`
772--
773
774DROP TABLE IF EXISTS `open_graph_caches`;
775/*!40101 SET @saved_cs_client = @@character_set_client */;
776/*!40101 SET character_set_client = utf8 */;
777CREATE TABLE `open_graph_caches` (
778 `id` int(11) NOT NULL AUTO_INCREMENT,
779 `title` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
780 `ob_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
781 `image` text COLLATE utf8mb4_bin,
782 `url` text COLLATE utf8mb4_bin,
783 `description` text COLLATE utf8mb4_bin,
784 PRIMARY KEY (`id`)
785) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
786/*!40101 SET character_set_client = @saved_cs_client */;
787
788--
789-- Dumping data for table `open_graph_caches`
790--
791
792LOCK TABLES `open_graph_caches` WRITE;
793/*!40000 ALTER TABLE `open_graph_caches` DISABLE KEYS */;
794/*!40000 ALTER TABLE `open_graph_caches` ENABLE KEYS */;
795UNLOCK TABLES;
796
797--
798-- Table structure for table `participations`
799--
800
801DROP TABLE IF EXISTS `participations`;
802/*!40101 SET @saved_cs_client = @@character_set_client */;
803/*!40101 SET character_set_client = utf8 */;
804CREATE TABLE `participations` (
805 `id` int(11) NOT NULL AUTO_INCREMENT,
806 `guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
807 `target_id` int(11) DEFAULT NULL,
808 `target_type` varchar(60) COLLATE utf8mb4_bin NOT NULL,
809 `author_id` int(11) DEFAULT NULL,
810 `created_at` datetime NOT NULL,
811 `updated_at` datetime NOT NULL,
812 `count` int(11) NOT NULL DEFAULT '1',
813 PRIMARY KEY (`id`),
814 UNIQUE KEY `index_participations_on_target_id_and_target_type_and_author_id` (`target_id`,`target_type`,`author_id`) USING BTREE,
815 KEY `index_participations_on_author_id` (`author_id`) USING BTREE,
816 KEY `index_participations_on_guid` (`guid`(191)) USING BTREE
817) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
818/*!40101 SET character_set_client = @saved_cs_client */;
819
820--
821-- Dumping data for table `participations`
822--
823
824LOCK TABLES `participations` WRITE;
825/*!40000 ALTER TABLE `participations` DISABLE KEYS */;
826/*!40000 ALTER TABLE `participations` ENABLE KEYS */;
827UNLOCK TABLES;
828
829--
830-- Table structure for table `people`
831--
832
833DROP TABLE IF EXISTS `people`;
834/*!40101 SET @saved_cs_client = @@character_set_client */;
835/*!40101 SET character_set_client = utf8 */;
836CREATE TABLE `people` (
837 `id` int(11) NOT NULL AUTO_INCREMENT,
838 `guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
839 `diaspora_handle` varchar(255) COLLATE utf8mb4_bin NOT NULL,
840 `serialized_public_key` text COLLATE utf8mb4_bin NOT NULL,
841 `owner_id` int(11) DEFAULT NULL,
842 `created_at` datetime NOT NULL,
843 `updated_at` datetime NOT NULL,
844 `closed_account` tinyint(1) DEFAULT '0',
845 `fetch_status` int(11) DEFAULT '0',
846 `pod_id` int(11) DEFAULT NULL,
847 PRIMARY KEY (`id`),
848 UNIQUE KEY `index_people_on_diaspora_handle` (`diaspora_handle`(191)) USING BTREE,
849 UNIQUE KEY `index_people_on_guid` (`guid`(191)) USING BTREE,
850 UNIQUE KEY `index_people_on_owner_id` (`owner_id`) USING BTREE,
851 KEY `people_pod_id_fk` (`pod_id`) USING BTREE,
852 CONSTRAINT `people_pod_id_fk` FOREIGN KEY (`pod_id`) REFERENCES `pods` (`id`) ON DELETE CASCADE
853) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
854/*!40101 SET character_set_client = @saved_cs_client */;
855
856--
857-- Dumping data for table `people`
858--
859
860LOCK TABLES `people` WRITE;
861/*!40000 ALTER TABLE `people` DISABLE KEYS */;
862/*!40000 ALTER TABLE `people` ENABLE KEYS */;
863UNLOCK TABLES;
864
865--
866-- Table structure for table `photos`
867--
868
869DROP TABLE IF EXISTS `photos`;
870/*!40101 SET @saved_cs_client = @@character_set_client */;
871/*!40101 SET character_set_client = utf8 */;
872CREATE TABLE `photos` (
873 `id` int(11) NOT NULL AUTO_INCREMENT,
874 `author_id` int(11) NOT NULL,
875 `public` tinyint(1) NOT NULL DEFAULT '0',
876 `guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
877 `pending` tinyint(1) NOT NULL DEFAULT '0',
878 `text` text COLLATE utf8mb4_bin,
879 `remote_photo_path` text COLLATE utf8mb4_bin,
880 `remote_photo_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
881 `random_string` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
882 `processed_image` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
883 `created_at` datetime DEFAULT NULL,
884 `updated_at` datetime DEFAULT NULL,
885 `unprocessed_image` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
886 `status_message_guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
887 `comments_count` int(11) DEFAULT NULL,
888 `height` int(11) DEFAULT NULL,
889 `width` int(11) DEFAULT NULL,
890 PRIMARY KEY (`id`),
891 UNIQUE KEY `index_photos_on_guid` (`guid`(191)) USING BTREE,
892 KEY `index_photos_on_status_message_guid` (`status_message_guid`(191)) USING BTREE
893) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
894/*!40101 SET character_set_client = @saved_cs_client */;
895
896--
897-- Dumping data for table `photos`
898--
899
900LOCK TABLES `photos` WRITE;
901/*!40000 ALTER TABLE `photos` DISABLE KEYS */;
902/*!40000 ALTER TABLE `photos` ENABLE KEYS */;
903UNLOCK TABLES;
904
905--
906-- Table structure for table `pods`
907--
908
909DROP TABLE IF EXISTS `pods`;
910/*!40101 SET @saved_cs_client = @@character_set_client */;
911/*!40101 SET character_set_client = utf8 */;
912CREATE TABLE `pods` (
913 `id` int(11) NOT NULL AUTO_INCREMENT,
914 `host` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
915 `ssl` tinyint(1) DEFAULT NULL,
916 `created_at` datetime NOT NULL,
917 `updated_at` datetime NOT NULL,
918 `status` int(11) DEFAULT '0',
919 `checked_at` datetime DEFAULT '1970-01-01 00:00:00',
920 `offline_since` datetime DEFAULT NULL,
921 `response_time` int(11) DEFAULT '-1',
922 `software` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
923 `error` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
924 `port` int(11) DEFAULT NULL,
925 `blocked` tinyint(1) DEFAULT '0',
926 PRIMARY KEY (`id`),
927 UNIQUE KEY `index_pods_on_host_and_port` (`host`(190),`port`) USING BTREE,
928 KEY `index_pods_on_checked_at` (`checked_at`) USING BTREE,
929 KEY `index_pods_on_offline_since` (`offline_since`) USING BTREE,
930 KEY `index_pods_on_status` (`status`) USING BTREE
931) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
932/*!40101 SET character_set_client = @saved_cs_client */;
933
934--
935-- Dumping data for table `pods`
936--
937
938LOCK TABLES `pods` WRITE;
939/*!40000 ALTER TABLE `pods` DISABLE KEYS */;
940/*!40000 ALTER TABLE `pods` ENABLE KEYS */;
941UNLOCK TABLES;
942
943--
944-- Table structure for table `poll_answers`
945--
946
947DROP TABLE IF EXISTS `poll_answers`;
948/*!40101 SET @saved_cs_client = @@character_set_client */;
949/*!40101 SET character_set_client = utf8 */;
950CREATE TABLE `poll_answers` (
951 `id` int(11) NOT NULL AUTO_INCREMENT,
952 `answer` varchar(255) COLLATE utf8mb4_bin NOT NULL,
953 `poll_id` int(11) NOT NULL,
954 `guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
955 `vote_count` int(11) DEFAULT '0',
956 PRIMARY KEY (`id`),
957 UNIQUE KEY `index_poll_answers_on_guid` (`guid`(191)) USING BTREE,
958 KEY `index_poll_answers_on_poll_id` (`poll_id`) USING BTREE
959) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
960/*!40101 SET character_set_client = @saved_cs_client */;
961
962--
963-- Dumping data for table `poll_answers`
964--
965
966LOCK TABLES `poll_answers` WRITE;
967/*!40000 ALTER TABLE `poll_answers` DISABLE KEYS */;
968/*!40000 ALTER TABLE `poll_answers` ENABLE KEYS */;
969UNLOCK TABLES;
970
971--
972-- Table structure for table `poll_participation_signatures`
973--
974
975DROP TABLE IF EXISTS `poll_participation_signatures`;
976/*!40101 SET @saved_cs_client = @@character_set_client */;
977/*!40101 SET character_set_client = utf8 */;
978CREATE TABLE `poll_participation_signatures` (
979 `poll_participation_id` int(11) NOT NULL,
980 `author_signature` text COLLATE utf8mb4_bin NOT NULL,
981 `signature_order_id` int(11) NOT NULL,
982 `additional_data` text COLLATE utf8mb4_bin,
983 UNIQUE KEY `index_poll_participation_signatures_on_poll_participation_id` (`poll_participation_id`) USING BTREE,
984 KEY `poll_participation_signatures_signature_orders_id_fk` (`signature_order_id`) USING BTREE,
985 CONSTRAINT `poll_participation_signatures_poll_participation_id_fk` FOREIGN KEY (`poll_participation_id`) REFERENCES `poll_participations` (`id`) ON DELETE CASCADE,
986 CONSTRAINT `poll_participation_signatures_signature_orders_id_fk` FOREIGN KEY (`signature_order_id`) REFERENCES `signature_orders` (`id`)
987) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
988/*!40101 SET character_set_client = @saved_cs_client */;
989
990--
991-- Dumping data for table `poll_participation_signatures`
992--
993
994LOCK TABLES `poll_participation_signatures` WRITE;
995/*!40000 ALTER TABLE `poll_participation_signatures` DISABLE KEYS */;
996/*!40000 ALTER TABLE `poll_participation_signatures` ENABLE KEYS */;
997UNLOCK TABLES;
998
999--
1000-- Table structure for table `poll_participations`
1001--
1002
1003DROP TABLE IF EXISTS `poll_participations`;
1004/*!40101 SET @saved_cs_client = @@character_set_client */;
1005/*!40101 SET character_set_client = utf8 */;
1006CREATE TABLE `poll_participations` (
1007 `id` int(11) NOT NULL AUTO_INCREMENT,
1008 `poll_answer_id` int(11) NOT NULL,
1009 `author_id` int(11) NOT NULL,
1010 `poll_id` int(11) NOT NULL,
1011 `guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1012 `created_at` datetime DEFAULT NULL,
1013 `updated_at` datetime DEFAULT NULL,
1014 PRIMARY KEY (`id`),
1015 UNIQUE KEY `index_poll_participations_on_guid` (`guid`(191)) USING BTREE,
1016 KEY `index_poll_participations_on_poll_id` (`poll_id`) USING BTREE
1017) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1018/*!40101 SET character_set_client = @saved_cs_client */;
1019
1020--
1021-- Dumping data for table `poll_participations`
1022--
1023
1024LOCK TABLES `poll_participations` WRITE;
1025/*!40000 ALTER TABLE `poll_participations` DISABLE KEYS */;
1026/*!40000 ALTER TABLE `poll_participations` ENABLE KEYS */;
1027UNLOCK TABLES;
1028
1029--
1030-- Table structure for table `polls`
1031--
1032
1033DROP TABLE IF EXISTS `polls`;
1034/*!40101 SET @saved_cs_client = @@character_set_client */;
1035/*!40101 SET character_set_client = utf8 */;
1036CREATE TABLE `polls` (
1037 `id` int(11) NOT NULL AUTO_INCREMENT,
1038 `question` varchar(255) COLLATE utf8mb4_bin NOT NULL,
1039 `status_message_id` int(11) NOT NULL,
1040 `status` tinyint(1) DEFAULT NULL,
1041 `guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1042 `created_at` datetime DEFAULT NULL,
1043 `updated_at` datetime DEFAULT NULL,
1044 PRIMARY KEY (`id`),
1045 UNIQUE KEY `index_polls_on_guid` (`guid`(191)) USING BTREE,
1046 KEY `index_polls_on_status_message_id` (`status_message_id`) USING BTREE
1047) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1048/*!40101 SET character_set_client = @saved_cs_client */;
1049
1050--
1051-- Dumping data for table `polls`
1052--
1053
1054LOCK TABLES `polls` WRITE;
1055/*!40000 ALTER TABLE `polls` DISABLE KEYS */;
1056/*!40000 ALTER TABLE `polls` ENABLE KEYS */;
1057UNLOCK TABLES;
1058
1059--
1060-- Table structure for table `posts`
1061--
1062
1063DROP TABLE IF EXISTS `posts`;
1064/*!40101 SET @saved_cs_client = @@character_set_client */;
1065/*!40101 SET character_set_client = utf8 */;
1066CREATE TABLE `posts` (
1067 `id` int(11) NOT NULL AUTO_INCREMENT,
1068 `author_id` int(11) NOT NULL,
1069 `public` tinyint(1) NOT NULL DEFAULT '0',
1070 `guid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
1071 `type` varchar(40) COLLATE utf8mb4_bin NOT NULL,
1072 `text` text COLLATE utf8mb4_bin,
1073 `created_at` datetime NOT NULL,
1074 `updated_at` datetime NOT NULL,
1075 `provider_display_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1076 `root_guid` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1077 `likes_count` int(11) DEFAULT '0',
1078 `comments_count` int(11) DEFAULT '0',
1079 `o_embed_cache_id` int(11) DEFAULT NULL,
1080 `reshares_count` int(11) DEFAULT '0',
1081 `interacted_at` datetime DEFAULT NULL,
1082 `facebook_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1083 `tweet_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1084 `open_graph_cache_id` int(11) DEFAULT NULL,
1085 `tumblr_ids` text COLLATE utf8mb4_bin,
1086 PRIMARY KEY (`id`),
1087 UNIQUE KEY `index_posts_on_guid` (`guid`(191)) USING BTREE,
1088 UNIQUE KEY `index_posts_on_author_id_and_root_guid` (`author_id`,`root_guid`(190)) USING BTREE,
1089 KEY `index_posts_on_person_id` (`author_id`) USING BTREE,
1090 KEY `index_posts_on_id_and_type_and_created_at` (`id`,`type`,`created_at`) USING BTREE,
1091 KEY `index_posts_on_id_and_type` (`id`,`type`) USING BTREE,
1092 KEY `index_posts_on_root_guid` (`root_guid`(191)) USING BTREE,
1093 KEY `index_posts_on_tweet_id` (`tweet_id`(191)) USING BTREE,
1094 CONSTRAINT `posts_author_id_fk` FOREIGN KEY (`author_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
1095) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1096/*!40101 SET character_set_client = @saved_cs_client */;
1097
1098--
1099-- Dumping data for table `posts`
1100--
1101
1102LOCK TABLES `posts` WRITE;
1103/*!40000 ALTER TABLE `posts` DISABLE KEYS */;
1104/*!40000 ALTER TABLE `posts` ENABLE KEYS */;
1105UNLOCK TABLES;
1106
1107--
1108-- Table structure for table `ppid`
1109--
1110
1111DROP TABLE IF EXISTS `ppid`;
1112/*!40101 SET @saved_cs_client = @@character_set_client */;
1113/*!40101 SET character_set_client = utf8 */;
1114CREATE TABLE `ppid` (
1115 `id` int(11) NOT NULL AUTO_INCREMENT,
1116 `o_auth_application_id` int(11) DEFAULT NULL,
1117 `user_id` int(11) DEFAULT NULL,
1118 `guid` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
1119 `string` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
1120 `identifier` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1121 PRIMARY KEY (`id`),
1122 KEY `index_ppid_on_o_auth_application_id` (`o_auth_application_id`) USING BTREE,
1123 KEY `index_ppid_on_user_id` (`user_id`) USING BTREE,
1124 CONSTRAINT `fk_rails_150457f962` FOREIGN KEY (`o_auth_application_id`) REFERENCES `o_auth_applications` (`id`),
1125 CONSTRAINT `fk_rails_e6b8e5264f` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
1126) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1127/*!40101 SET character_set_client = @saved_cs_client */;
1128
1129--
1130-- Dumping data for table `ppid`
1131--
1132
1133LOCK TABLES `ppid` WRITE;
1134/*!40000 ALTER TABLE `ppid` DISABLE KEYS */;
1135/*!40000 ALTER TABLE `ppid` ENABLE KEYS */;
1136UNLOCK TABLES;
1137
1138--
1139-- Table structure for table `profiles`
1140--
1141
1142DROP TABLE IF EXISTS `profiles`;
1143/*!40101 SET @saved_cs_client = @@character_set_client */;
1144/*!40101 SET character_set_client = utf8 */;
1145CREATE TABLE `profiles` (
1146 `id` int(11) NOT NULL AUTO_INCREMENT,
1147 `diaspora_handle` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1148 `first_name` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
1149 `last_name` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
1150 `image_url` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1151 `image_url_small` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1152 `image_url_medium` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1153 `birthday` date DEFAULT NULL,
1154 `gender` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1155 `bio` text COLLATE utf8mb4_bin,
1156 `searchable` tinyint(1) NOT NULL DEFAULT '1',
1157 `person_id` int(11) NOT NULL,
1158 `created_at` datetime NOT NULL,
1159 `updated_at` datetime NOT NULL,
1160 `location` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1161 `full_name` varchar(70) COLLATE utf8mb4_bin DEFAULT NULL,
1162 `nsfw` tinyint(1) DEFAULT '0',
1163 `public_details` tinyint(1) DEFAULT '0',
1164 PRIMARY KEY (`id`),
1165 KEY `index_profiles_on_full_name_and_searchable` (`full_name`,`searchable`) USING BTREE,
1166 KEY `index_profiles_on_full_name` (`full_name`) USING BTREE,
1167 KEY `index_profiles_on_person_id` (`person_id`) USING BTREE,
1168 CONSTRAINT `profiles_person_id_fk` FOREIGN KEY (`person_id`) REFERENCES `people` (`id`) ON DELETE CASCADE
1169) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1170/*!40101 SET character_set_client = @saved_cs_client */;
1171
1172--
1173-- Dumping data for table `profiles`
1174--
1175
1176LOCK TABLES `profiles` WRITE;
1177/*!40000 ALTER TABLE `profiles` DISABLE KEYS */;
1178/*!40000 ALTER TABLE `profiles` ENABLE KEYS */;
1179UNLOCK TABLES;
1180
1181--
1182-- Table structure for table `rails_admin_histories`
1183--
1184
1185DROP TABLE IF EXISTS `rails_admin_histories`;
1186/*!40101 SET @saved_cs_client = @@character_set_client */;
1187/*!40101 SET character_set_client = utf8 */;
1188CREATE TABLE `rails_admin_histories` (
1189 `id` int(11) NOT NULL AUTO_INCREMENT,
1190 `message` text COLLATE utf8mb4_bin,
1191 `username` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1192 `item` int(11) DEFAULT NULL,
1193 `table` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1194 `month` smallint(6) DEFAULT NULL,
1195 `year` bigint(20) DEFAULT NULL,
1196 `created_at` datetime NOT NULL,
1197 `updated_at` datetime NOT NULL,
1198 PRIMARY KEY (`id`),
1199 KEY `index_rails_admin_histories` (`item`,`table`(188),`month`,`year`) USING BTREE
1200) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1201/*!40101 SET character_set_client = @saved_cs_client */;
1202
1203--
1204-- Dumping data for table `rails_admin_histories`
1205--
1206
1207LOCK TABLES `rails_admin_histories` WRITE;
1208/*!40000 ALTER TABLE `rails_admin_histories` DISABLE KEYS */;
1209/*!40000 ALTER TABLE `rails_admin_histories` ENABLE KEYS */;
1210UNLOCK TABLES;
1211
1212--
1213-- Table structure for table `reports`
1214--
1215
1216DROP TABLE IF EXISTS `reports`;
1217/*!40101 SET @saved_cs_client = @@character_set_client */;
1218/*!40101 SET character_set_client = utf8 */;
1219CREATE TABLE `reports` (
1220 `id` int(11) NOT NULL AUTO_INCREMENT,
1221 `item_id` int(11) NOT NULL,
1222 `item_type` varchar(255) COLLATE utf8mb4_bin NOT NULL,
1223 `reviewed` tinyint(1) DEFAULT '0',
1224 `text` text COLLATE utf8mb4_bin,
1225 `created_at` datetime DEFAULT NULL,
1226 `updated_at` datetime DEFAULT NULL,
1227 `user_id` int(11) NOT NULL,
1228 PRIMARY KEY (`id`),
1229 KEY `index_reports_on_item_id` (`item_id`) USING BTREE
1230) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1231/*!40101 SET character_set_client = @saved_cs_client */;
1232
1233--
1234-- Dumping data for table `reports`
1235--
1236
1237LOCK TABLES `reports` WRITE;
1238/*!40000 ALTER TABLE `reports` DISABLE KEYS */;
1239/*!40000 ALTER TABLE `reports` ENABLE KEYS */;
1240UNLOCK TABLES;
1241
1242--
1243-- Table structure for table `roles`
1244--
1245
1246DROP TABLE IF EXISTS `roles`;
1247/*!40101 SET @saved_cs_client = @@character_set_client */;
1248/*!40101 SET character_set_client = utf8 */;
1249CREATE TABLE `roles` (
1250 `id` int(11) NOT NULL AUTO_INCREMENT,
1251 `person_id` int(11) DEFAULT NULL,
1252 `name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1253 `created_at` datetime NOT NULL,
1254 `updated_at` datetime NOT NULL,
1255 PRIMARY KEY (`id`)
1256) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1257/*!40101 SET character_set_client = @saved_cs_client */;
1258
1259--
1260-- Dumping data for table `roles`
1261--
1262
1263LOCK TABLES `roles` WRITE;
1264/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
1265/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
1266UNLOCK TABLES;
1267
1268--
1269-- Table structure for table `schema_migrations`
1270--
1271
1272DROP TABLE IF EXISTS `schema_migrations`;
1273/*!40101 SET @saved_cs_client = @@character_set_client */;
1274/*!40101 SET character_set_client = utf8 */;
1275CREATE TABLE `schema_migrations` (
1276 `version` varchar(191) COLLATE utf8mb4_bin NOT NULL,
1277 UNIQUE KEY `unique_schema_migrations` (`version`)
1278) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1279/*!40101 SET character_set_client = @saved_cs_client */;
1280
1281--
1282-- Dumping data for table `schema_migrations`
1283--
1284
1285LOCK TABLES `schema_migrations` WRITE;
1286/*!40000 ALTER TABLE `schema_migrations` DISABLE KEYS */;
1287INSERT 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');
1288/*!40000 ALTER TABLE `schema_migrations` ENABLE KEYS */;
1289UNLOCK TABLES;
1290
1291--
1292-- Table structure for table `services`
1293--
1294
1295DROP TABLE IF EXISTS `services`;
1296/*!40101 SET @saved_cs_client = @@character_set_client */;
1297/*!40101 SET character_set_client = utf8 */;
1298CREATE TABLE `services` (
1299 `id` int(11) NOT NULL AUTO_INCREMENT,
1300 `type` varchar(127) COLLATE utf8mb4_bin NOT NULL,
1301 `user_id` int(11) NOT NULL,
1302 `uid` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
1303 `access_token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1304 `access_secret` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1305 `nickname` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1306 `created_at` datetime NOT NULL,
1307 `updated_at` datetime NOT NULL,
1308 PRIMARY KEY (`id`),
1309 KEY `index_services_on_type_and_uid` (`type`(64),`uid`) USING BTREE,
1310 KEY `index_services_on_user_id` (`user_id`) USING BTREE,
1311 CONSTRAINT `services_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
1312) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1313/*!40101 SET character_set_client = @saved_cs_client */;
1314
1315--
1316-- Dumping data for table `services`
1317--
1318
1319LOCK TABLES `services` WRITE;
1320/*!40000 ALTER TABLE `services` DISABLE KEYS */;
1321/*!40000 ALTER TABLE `services` ENABLE KEYS */;
1322UNLOCK TABLES;
1323
1324--
1325-- Table structure for table `share_visibilities`
1326--
1327
1328DROP TABLE IF EXISTS `share_visibilities`;
1329/*!40101 SET @saved_cs_client = @@character_set_client */;
1330/*!40101 SET character_set_client = utf8 */;
1331CREATE TABLE `share_visibilities` (
1332 `id` int(11) NOT NULL AUTO_INCREMENT,
1333 `shareable_id` int(11) NOT NULL,
1334 `hidden` tinyint(1) NOT NULL DEFAULT '0',
1335 `shareable_type` varchar(60) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Post',
1336 `user_id` int(11) NOT NULL,
1337 PRIMARY KEY (`id`),
1338 KEY `shareable_and_hidden_and_user_id` (`shareable_id`,`shareable_type`,`hidden`,`user_id`) USING BTREE,
1339 KEY `shareable_and_user_id` (`shareable_id`,`shareable_type`,`user_id`) USING BTREE,
1340 KEY `index_post_visibilities_on_post_id` (`shareable_id`) USING BTREE,
1341 KEY `index_share_visibilities_on_user_id` (`user_id`) USING BTREE,
1342 CONSTRAINT `share_visibilities_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
1343) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1344/*!40101 SET character_set_client = @saved_cs_client */;
1345
1346--
1347-- Dumping data for table `share_visibilities`
1348--
1349
1350LOCK TABLES `share_visibilities` WRITE;
1351/*!40000 ALTER TABLE `share_visibilities` DISABLE KEYS */;
1352/*!40000 ALTER TABLE `share_visibilities` ENABLE KEYS */;
1353UNLOCK TABLES;
1354
1355--
1356-- Table structure for table `signature_orders`
1357--
1358
1359DROP TABLE IF EXISTS `signature_orders`;
1360/*!40101 SET @saved_cs_client = @@character_set_client */;
1361/*!40101 SET character_set_client = utf8 */;
1362CREATE TABLE `signature_orders` (
1363 `id` int(11) NOT NULL AUTO_INCREMENT,
1364 `order` varchar(255) COLLATE utf8mb4_bin NOT NULL,
1365 PRIMARY KEY (`id`),
1366 UNIQUE KEY `index_signature_orders_on_order` (`order`(191)) USING BTREE
1367) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1368/*!40101 SET character_set_client = @saved_cs_client */;
1369
1370--
1371-- Dumping data for table `signature_orders`
1372--
1373
1374LOCK TABLES `signature_orders` WRITE;
1375/*!40000 ALTER TABLE `signature_orders` DISABLE KEYS */;
1376/*!40000 ALTER TABLE `signature_orders` ENABLE KEYS */;
1377UNLOCK TABLES;
1378
1379--
1380-- Table structure for table `simple_captcha_data`
1381--
1382
1383DROP TABLE IF EXISTS `simple_captcha_data`;
1384/*!40101 SET @saved_cs_client = @@character_set_client */;
1385/*!40101 SET character_set_client = utf8 */;
1386CREATE TABLE `simple_captcha_data` (
1387 `id` int(11) NOT NULL AUTO_INCREMENT,
1388 `key` varchar(40) COLLATE utf8mb4_bin DEFAULT NULL,
1389 `value` varchar(12) COLLATE utf8mb4_bin DEFAULT NULL,
1390 `created_at` datetime DEFAULT NULL,
1391 `updated_at` datetime DEFAULT NULL,
1392 PRIMARY KEY (`id`),
1393 KEY `idx_key` (`key`) USING BTREE
1394) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1395/*!40101 SET character_set_client = @saved_cs_client */;
1396
1397--
1398-- Dumping data for table `simple_captcha_data`
1399--
1400
1401LOCK TABLES `simple_captcha_data` WRITE;
1402/*!40000 ALTER TABLE `simple_captcha_data` DISABLE KEYS */;
1403/*!40000 ALTER TABLE `simple_captcha_data` ENABLE KEYS */;
1404UNLOCK TABLES;
1405
1406--
1407-- Table structure for table `tag_followings`
1408--
1409
1410DROP TABLE IF EXISTS `tag_followings`;
1411/*!40101 SET @saved_cs_client = @@character_set_client */;
1412/*!40101 SET character_set_client = utf8 */;
1413CREATE TABLE `tag_followings` (
1414 `id` int(11) NOT NULL AUTO_INCREMENT,
1415 `tag_id` int(11) NOT NULL,
1416 `user_id` int(11) NOT NULL,
1417 `created_at` datetime NOT NULL,
1418 `updated_at` datetime NOT NULL,
1419 PRIMARY KEY (`id`),
1420 UNIQUE KEY `index_tag_followings_on_tag_id_and_user_id` (`tag_id`,`user_id`) USING BTREE,
1421 KEY `index_tag_followings_on_tag_id` (`tag_id`) USING BTREE,
1422 KEY `index_tag_followings_on_user_id` (`user_id`) USING BTREE
1423) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1424/*!40101 SET character_set_client = @saved_cs_client */;
1425
1426--
1427-- Dumping data for table `tag_followings`
1428--
1429
1430LOCK TABLES `tag_followings` WRITE;
1431/*!40000 ALTER TABLE `tag_followings` DISABLE KEYS */;
1432/*!40000 ALTER TABLE `tag_followings` ENABLE KEYS */;
1433UNLOCK TABLES;
1434
1435--
1436-- Table structure for table `taggings`
1437--
1438
1439DROP TABLE IF EXISTS `taggings`;
1440/*!40101 SET @saved_cs_client = @@character_set_client */;
1441/*!40101 SET character_set_client = utf8 */;
1442CREATE TABLE `taggings` (
1443 `id` int(11) NOT NULL AUTO_INCREMENT,
1444 `tag_id` int(11) DEFAULT NULL,
1445 `taggable_id` int(11) DEFAULT NULL,
1446 `taggable_type` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
1447 `tagger_id` int(11) DEFAULT NULL,
1448 `tagger_type` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
1449 `context` varchar(127) COLLATE utf8mb4_bin DEFAULT NULL,
1450 `created_at` datetime DEFAULT NULL,
1451 PRIMARY KEY (`id`),
1452 UNIQUE KEY `index_taggings_uniquely` (`taggable_id`,`taggable_type`,`tag_id`) USING BTREE,
1453 KEY `index_taggings_on_created_at` (`created_at`) USING BTREE,
1454 KEY `index_taggings_on_tag_id` (`tag_id`) USING BTREE,
1455 KEY `index_taggings_on_taggable_id_and_taggable_type_and_context` (`taggable_id`,`taggable_type`(95),`context`(95)) USING BTREE
1456) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1457/*!40101 SET character_set_client = @saved_cs_client */;
1458
1459--
1460-- Dumping data for table `taggings`
1461--
1462
1463LOCK TABLES `taggings` WRITE;
1464/*!40000 ALTER TABLE `taggings` DISABLE KEYS */;
1465/*!40000 ALTER TABLE `taggings` ENABLE KEYS */;
1466UNLOCK TABLES;
1467
1468--
1469-- Table structure for table `tags`
1470--
1471
1472DROP TABLE IF EXISTS `tags`;
1473/*!40101 SET @saved_cs_client = @@character_set_client */;
1474/*!40101 SET character_set_client = utf8 */;
1475CREATE TABLE `tags` (
1476 `id` int(11) NOT NULL AUTO_INCREMENT,
1477 `name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1478 `taggings_count` int(11) DEFAULT '0',
1479 PRIMARY KEY (`id`),
1480 UNIQUE KEY `index_tags_on_name` (`name`(191)) USING BTREE
1481) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1482/*!40101 SET character_set_client = @saved_cs_client */;
1483
1484--
1485-- Dumping data for table `tags`
1486--
1487
1488LOCK TABLES `tags` WRITE;
1489/*!40000 ALTER TABLE `tags` DISABLE KEYS */;
1490/*!40000 ALTER TABLE `tags` ENABLE KEYS */;
1491UNLOCK TABLES;
1492
1493--
1494-- Table structure for table `user_preferences`
1495--
1496
1497DROP TABLE IF EXISTS `user_preferences`;
1498/*!40101 SET @saved_cs_client = @@character_set_client */;
1499/*!40101 SET character_set_client = utf8 */;
1500CREATE TABLE `user_preferences` (
1501 `id` int(11) NOT NULL AUTO_INCREMENT,
1502 `email_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1503 `user_id` int(11) DEFAULT NULL,
1504 `created_at` datetime NOT NULL,
1505 `updated_at` datetime NOT NULL,
1506 PRIMARY KEY (`id`)
1507) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1508/*!40101 SET character_set_client = @saved_cs_client */;
1509
1510--
1511-- Dumping data for table `user_preferences`
1512--
1513
1514LOCK TABLES `user_preferences` WRITE;
1515/*!40000 ALTER TABLE `user_preferences` DISABLE KEYS */;
1516/*!40000 ALTER TABLE `user_preferences` ENABLE KEYS */;
1517UNLOCK TABLES;
1518
1519--
1520-- Table structure for table `users`
1521--
1522
1523DROP TABLE IF EXISTS `users`;
1524/*!40101 SET @saved_cs_client = @@character_set_client */;
1525/*!40101 SET character_set_client = utf8 */;
1526CREATE TABLE `users` (
1527 `id` int(11) NOT NULL AUTO_INCREMENT,
1528 `username` varchar(255) COLLATE utf8mb4_bin NOT NULL,
1529 `serialized_private_key` text COLLATE utf8mb4_bin,
1530 `getting_started` tinyint(1) NOT NULL DEFAULT '1',
1531 `disable_mail` tinyint(1) NOT NULL DEFAULT '0',
1532 `language` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1533 `email` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
1534 `encrypted_password` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
1535 `reset_password_token` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1536 `remember_created_at` datetime DEFAULT NULL,
1537 `sign_in_count` int(11) DEFAULT '0',
1538 `current_sign_in_at` datetime DEFAULT NULL,
1539 `last_sign_in_at` datetime DEFAULT NULL,
1540 `current_sign_in_ip` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1541 `last_sign_in_ip` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1542 `created_at` datetime NOT NULL,
1543 `updated_at` datetime NOT NULL,
1544 `invited_by_id` int(11) DEFAULT NULL,
1545 `authentication_token` varchar(30) COLLATE utf8mb4_bin DEFAULT NULL,
1546 `unconfirmed_email` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1547 `confirm_email_token` varchar(30) COLLATE utf8mb4_bin DEFAULT NULL,
1548 `locked_at` datetime DEFAULT NULL,
1549 `show_community_spotlight_in_stream` tinyint(1) NOT NULL DEFAULT '1',
1550 `auto_follow_back` tinyint(1) DEFAULT '0',
1551 `auto_follow_back_aspect_id` int(11) DEFAULT NULL,
1552 `hidden_shareables` text COLLATE utf8mb4_bin,
1553 `reset_password_sent_at` datetime DEFAULT NULL,
1554 `last_seen` datetime DEFAULT NULL,
1555 `remove_after` datetime DEFAULT NULL,
1556 `export` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1557 `exported_at` datetime DEFAULT NULL,
1558 `exporting` tinyint(1) DEFAULT '0',
1559 `strip_exif` tinyint(1) DEFAULT '1',
1560 `exported_photos_file` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1561 `exported_photos_at` datetime DEFAULT NULL,
1562 `exporting_photos` tinyint(1) DEFAULT '0',
1563 `color_theme` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
1564 PRIMARY KEY (`id`),
1565 UNIQUE KEY `index_users_on_email` (`email`(191)) USING BTREE,
1566 UNIQUE KEY `index_users_on_username` (`username`(191)) USING BTREE,
1567 UNIQUE KEY `index_users_on_authentication_token` (`authentication_token`) USING BTREE
1568) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
1569/*!40101 SET character_set_client = @saved_cs_client */;
1570
1571--
1572-- Dumping data for table `users`
1573--
1574
1575LOCK TABLES `users` WRITE;
1576/*!40000 ALTER TABLE `users` DISABLE KEYS */;
1577/*!40000 ALTER TABLE `users` ENABLE KEYS */;
1578UNLOCK TABLES;
1579/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1580
1581/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1582/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1583/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1584/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1585/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1586/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1587/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1588
1589-- Dump completed on 2016-10-02 11:57:11