· 7 years ago · Feb 23, 2019, 09:04 AM
1-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64)
2--
3-- Host: localhost Database: monica
4-- ------------------------------------------------------
5-- Server version 10.1.38-MariaDB-0ubuntu0.18.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 utf8mb4 */;
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-- Current Database: `monica`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `monica` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
23
24USE `monica`;
25
26--
27-- Table structure for table `monica_accounts`
28--
29
30DROP TABLE IF EXISTS `monica_accounts`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `monica_accounts` (
34 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
35 `has_access_to_paid_version_for_free` tinyint(1) NOT NULL DEFAULT '0',
36 `api_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
37 `number_of_invitations_sent` int(11) DEFAULT NULL,
38 `default_time_reminder_is_sent` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '12:00',
39 `stripe_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
40 `card_brand` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
41 `card_last_four` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
42 `trial_ends_at` timestamp NULL DEFAULT NULL,
43 `legacy_free_plan_unlimited_contacts` tinyint(1) NOT NULL DEFAULT '0',
44 `created_at` timestamp NULL DEFAULT NULL,
45 `updated_at` timestamp NULL DEFAULT NULL,
46 PRIMARY KEY (`id`)
47) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
48/*!40101 SET character_set_client = @saved_cs_client */;
49
50--
51-- Dumping data for table `monica_accounts`
52--
53
54LOCK TABLES `monica_accounts` WRITE;
55/*!40000 ALTER TABLE `monica_accounts` DISABLE KEYS */;
56/*!40000 ALTER TABLE `monica_accounts` ENABLE KEYS */;
57UNLOCK TABLES;
58
59--
60-- Table structure for table `monica_activities`
61--
62
63DROP TABLE IF EXISTS `monica_activities`;
64/*!40101 SET @saved_cs_client = @@character_set_client */;
65/*!40101 SET character_set_client = utf8 */;
66CREATE TABLE `monica_activities` (
67 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
68 `account_id` int(10) unsigned NOT NULL,
69 `activity_type_id` int(10) unsigned DEFAULT NULL,
70 `summary` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
71 `description` longtext COLLATE utf8mb4_unicode_ci,
72 `date_it_happened` datetime NOT NULL,
73 `created_at` timestamp NULL DEFAULT NULL,
74 `updated_at` timestamp NULL DEFAULT NULL,
75 PRIMARY KEY (`id`),
76 KEY `activities_account_id_foreign` (`account_id`),
77 KEY `activities_activity_type_id_foreign` (`activity_type_id`),
78 CONSTRAINT `activities_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
79 CONSTRAINT `activities_activity_type_id_foreign` FOREIGN KEY (`activity_type_id`) REFERENCES `monica_activity_types` (`id`) ON DELETE SET NULL
80) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
81/*!40101 SET character_set_client = @saved_cs_client */;
82
83--
84-- Dumping data for table `monica_activities`
85--
86
87LOCK TABLES `monica_activities` WRITE;
88/*!40000 ALTER TABLE `monica_activities` DISABLE KEYS */;
89/*!40000 ALTER TABLE `monica_activities` ENABLE KEYS */;
90UNLOCK TABLES;
91
92--
93-- Table structure for table `monica_activity_contact`
94--
95
96DROP TABLE IF EXISTS `monica_activity_contact`;
97/*!40101 SET @saved_cs_client = @@character_set_client */;
98/*!40101 SET character_set_client = utf8 */;
99CREATE TABLE `monica_activity_contact` (
100 `activity_id` int(10) unsigned NOT NULL,
101 `contact_id` int(10) unsigned NOT NULL,
102 `account_id` int(10) unsigned NOT NULL,
103 KEY `activity_contact_activity_id_foreign` (`activity_id`),
104 KEY `activity_contact_contact_id_foreign` (`contact_id`),
105 KEY `activity_contact_account_id_foreign` (`account_id`),
106 CONSTRAINT `activity_contact_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
107 CONSTRAINT `activity_contact_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `monica_activities` (`id`) ON DELETE CASCADE,
108 CONSTRAINT `activity_contact_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
109) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
110/*!40101 SET character_set_client = @saved_cs_client */;
111
112--
113-- Dumping data for table `monica_activity_contact`
114--
115
116LOCK TABLES `monica_activity_contact` WRITE;
117/*!40000 ALTER TABLE `monica_activity_contact` DISABLE KEYS */;
118/*!40000 ALTER TABLE `monica_activity_contact` ENABLE KEYS */;
119UNLOCK TABLES;
120
121--
122-- Table structure for table `monica_activity_statistics`
123--
124
125DROP TABLE IF EXISTS `monica_activity_statistics`;
126/*!40101 SET @saved_cs_client = @@character_set_client */;
127/*!40101 SET character_set_client = utf8 */;
128CREATE TABLE `monica_activity_statistics` (
129 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
130 `account_id` int(11) NOT NULL,
131 `contact_id` int(11) NOT NULL,
132 `year` int(11) NOT NULL,
133 `count` int(11) NOT NULL,
134 `created_at` timestamp NULL DEFAULT NULL,
135 `updated_at` timestamp NULL DEFAULT NULL,
136 PRIMARY KEY (`id`)
137) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
138/*!40101 SET character_set_client = @saved_cs_client */;
139
140--
141-- Dumping data for table `monica_activity_statistics`
142--
143
144LOCK TABLES `monica_activity_statistics` WRITE;
145/*!40000 ALTER TABLE `monica_activity_statistics` DISABLE KEYS */;
146/*!40000 ALTER TABLE `monica_activity_statistics` ENABLE KEYS */;
147UNLOCK TABLES;
148
149--
150-- Table structure for table `monica_activity_type_categories`
151--
152
153DROP TABLE IF EXISTS `monica_activity_type_categories`;
154/*!40101 SET @saved_cs_client = @@character_set_client */;
155/*!40101 SET character_set_client = utf8 */;
156CREATE TABLE `monica_activity_type_categories` (
157 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
158 `account_id` int(10) unsigned NOT NULL,
159 `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
160 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
161 `created_at` timestamp NULL DEFAULT NULL,
162 `updated_at` timestamp NULL DEFAULT NULL,
163 PRIMARY KEY (`id`),
164 KEY `activity_type_categories_account_id_foreign` (`account_id`),
165 CONSTRAINT `activity_type_categories_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
166) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
167/*!40101 SET character_set_client = @saved_cs_client */;
168
169--
170-- Dumping data for table `monica_activity_type_categories`
171--
172
173LOCK TABLES `monica_activity_type_categories` WRITE;
174/*!40000 ALTER TABLE `monica_activity_type_categories` DISABLE KEYS */;
175/*!40000 ALTER TABLE `monica_activity_type_categories` ENABLE KEYS */;
176UNLOCK TABLES;
177
178--
179-- Table structure for table `monica_activity_types`
180--
181
182DROP TABLE IF EXISTS `monica_activity_types`;
183/*!40101 SET @saved_cs_client = @@character_set_client */;
184/*!40101 SET character_set_client = utf8 */;
185CREATE TABLE `monica_activity_types` (
186 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
187 `account_id` int(10) unsigned NOT NULL,
188 `activity_type_category_id` int(10) unsigned NOT NULL,
189 `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
190 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
191 `location_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
192 `created_at` timestamp NULL DEFAULT NULL,
193 `updated_at` timestamp NULL DEFAULT NULL,
194 PRIMARY KEY (`id`),
195 KEY `activity_types_account_id_foreign` (`account_id`),
196 KEY `activity_types_activity_type_category_id_foreign` (`activity_type_category_id`),
197 CONSTRAINT `activity_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
198 CONSTRAINT `activity_types_activity_type_category_id_foreign` FOREIGN KEY (`activity_type_category_id`) REFERENCES `monica_activity_type_categories` (`id`) ON DELETE CASCADE
199) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
200/*!40101 SET character_set_client = @saved_cs_client */;
201
202--
203-- Dumping data for table `monica_activity_types`
204--
205
206LOCK TABLES `monica_activity_types` WRITE;
207/*!40000 ALTER TABLE `monica_activity_types` DISABLE KEYS */;
208/*!40000 ALTER TABLE `monica_activity_types` ENABLE KEYS */;
209UNLOCK TABLES;
210
211--
212-- Table structure for table `monica_addresses`
213--
214
215DROP TABLE IF EXISTS `monica_addresses`;
216/*!40101 SET @saved_cs_client = @@character_set_client */;
217/*!40101 SET character_set_client = utf8 */;
218CREATE TABLE `monica_addresses` (
219 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
220 `account_id` int(10) unsigned NOT NULL,
221 `place_id` int(10) unsigned DEFAULT NULL,
222 `contact_id` int(10) unsigned NOT NULL,
223 `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
224 `created_at` timestamp NULL DEFAULT NULL,
225 `updated_at` timestamp NULL DEFAULT NULL,
226 PRIMARY KEY (`id`),
227 KEY `addresses_account_id_foreign` (`account_id`),
228 KEY `addresses_contact_id_foreign` (`contact_id`),
229 KEY `addresses_place_id_foreign` (`place_id`),
230 CONSTRAINT `addresses_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
231 CONSTRAINT `addresses_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
232 CONSTRAINT `addresses_place_id_foreign` FOREIGN KEY (`place_id`) REFERENCES `monica_places` (`id`) ON DELETE CASCADE
233) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
234/*!40101 SET character_set_client = @saved_cs_client */;
235
236--
237-- Dumping data for table `monica_addresses`
238--
239
240LOCK TABLES `monica_addresses` WRITE;
241/*!40000 ALTER TABLE `monica_addresses` DISABLE KEYS */;
242/*!40000 ALTER TABLE `monica_addresses` ENABLE KEYS */;
243UNLOCK TABLES;
244
245--
246-- Table structure for table `monica_api_usage`
247--
248
249DROP TABLE IF EXISTS `monica_api_usage`;
250/*!40101 SET @saved_cs_client = @@character_set_client */;
251/*!40101 SET character_set_client = utf8 */;
252CREATE TABLE `monica_api_usage` (
253 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
254 `url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
255 `method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
256 `client_ip` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
257 `created_at` timestamp NULL DEFAULT NULL,
258 `updated_at` timestamp NULL DEFAULT NULL,
259 PRIMARY KEY (`id`)
260) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
261/*!40101 SET character_set_client = @saved_cs_client */;
262
263--
264-- Dumping data for table `monica_api_usage`
265--
266
267LOCK TABLES `monica_api_usage` WRITE;
268/*!40000 ALTER TABLE `monica_api_usage` DISABLE KEYS */;
269/*!40000 ALTER TABLE `monica_api_usage` ENABLE KEYS */;
270UNLOCK TABLES;
271
272--
273-- Table structure for table `monica_cache`
274--
275
276DROP TABLE IF EXISTS `monica_cache`;
277/*!40101 SET @saved_cs_client = @@character_set_client */;
278/*!40101 SET character_set_client = utf8 */;
279CREATE TABLE `monica_cache` (
280 `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
281 `value` text COLLATE utf8mb4_unicode_ci NOT NULL,
282 `expiration` int(11) NOT NULL,
283 UNIQUE KEY `cache_key_unique` (`key`)
284) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
285/*!40101 SET character_set_client = @saved_cs_client */;
286
287--
288-- Dumping data for table `monica_cache`
289--
290
291LOCK TABLES `monica_cache` WRITE;
292/*!40000 ALTER TABLE `monica_cache` DISABLE KEYS */;
293/*!40000 ALTER TABLE `monica_cache` ENABLE KEYS */;
294UNLOCK TABLES;
295
296--
297-- Table structure for table `monica_calls`
298--
299
300DROP TABLE IF EXISTS `monica_calls`;
301/*!40101 SET @saved_cs_client = @@character_set_client */;
302/*!40101 SET character_set_client = utf8 */;
303CREATE TABLE `monica_calls` (
304 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
305 `account_id` int(11) NOT NULL,
306 `contact_id` int(11) NOT NULL,
307 `called_at` datetime NOT NULL,
308 `content` mediumtext COLLATE utf8mb4_unicode_ci,
309 `contact_called` tinyint(1) NOT NULL DEFAULT '0',
310 `created_at` timestamp NULL DEFAULT NULL,
311 `updated_at` timestamp NULL DEFAULT NULL,
312 PRIMARY KEY (`id`)
313) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
314/*!40101 SET character_set_client = @saved_cs_client */;
315
316--
317-- Dumping data for table `monica_calls`
318--
319
320LOCK TABLES `monica_calls` WRITE;
321/*!40000 ALTER TABLE `monica_calls` DISABLE KEYS */;
322/*!40000 ALTER TABLE `monica_calls` ENABLE KEYS */;
323UNLOCK TABLES;
324
325--
326-- Table structure for table `monica_companies`
327--
328
329DROP TABLE IF EXISTS `monica_companies`;
330/*!40101 SET @saved_cs_client = @@character_set_client */;
331/*!40101 SET character_set_client = utf8 */;
332CREATE TABLE `monica_companies` (
333 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
334 `account_id` int(10) unsigned NOT NULL,
335 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
336 `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
337 `number_of_employees` int(11) DEFAULT NULL,
338 `created_at` timestamp NULL DEFAULT NULL,
339 `updated_at` timestamp NULL DEFAULT NULL,
340 PRIMARY KEY (`id`),
341 KEY `companies_account_id_foreign` (`account_id`),
342 CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
343) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
344/*!40101 SET character_set_client = @saved_cs_client */;
345
346--
347-- Dumping data for table `monica_companies`
348--
349
350LOCK TABLES `monica_companies` WRITE;
351/*!40000 ALTER TABLE `monica_companies` DISABLE KEYS */;
352/*!40000 ALTER TABLE `monica_companies` ENABLE KEYS */;
353UNLOCK TABLES;
354
355--
356-- Table structure for table `monica_contact_field_types`
357--
358
359DROP TABLE IF EXISTS `monica_contact_field_types`;
360/*!40101 SET @saved_cs_client = @@character_set_client */;
361/*!40101 SET character_set_client = utf8 */;
362CREATE TABLE `monica_contact_field_types` (
363 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
364 `account_id` int(10) unsigned NOT NULL,
365 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
366 `fontawesome_icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
367 `protocol` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
368 `delible` tinyint(1) NOT NULL DEFAULT '1',
369 `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
370 `created_at` timestamp NULL DEFAULT NULL,
371 `updated_at` timestamp NULL DEFAULT NULL,
372 PRIMARY KEY (`id`),
373 KEY `contact_field_types_account_id_foreign` (`account_id`),
374 CONSTRAINT `contact_field_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
375) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
376/*!40101 SET character_set_client = @saved_cs_client */;
377
378--
379-- Dumping data for table `monica_contact_field_types`
380--
381
382LOCK TABLES `monica_contact_field_types` WRITE;
383/*!40000 ALTER TABLE `monica_contact_field_types` DISABLE KEYS */;
384/*!40000 ALTER TABLE `monica_contact_field_types` ENABLE KEYS */;
385UNLOCK TABLES;
386
387--
388-- Table structure for table `monica_contact_fields`
389--
390
391DROP TABLE IF EXISTS `monica_contact_fields`;
392/*!40101 SET @saved_cs_client = @@character_set_client */;
393/*!40101 SET character_set_client = utf8 */;
394CREATE TABLE `monica_contact_fields` (
395 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
396 `account_id` int(10) unsigned NOT NULL,
397 `contact_id` int(10) unsigned NOT NULL,
398 `contact_field_type_id` int(10) unsigned NOT NULL,
399 `data` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
400 `created_at` timestamp NULL DEFAULT NULL,
401 `updated_at` timestamp NULL DEFAULT NULL,
402 PRIMARY KEY (`id`),
403 KEY `contact_fields_account_id_foreign` (`account_id`),
404 KEY `contact_fields_contact_id_foreign` (`contact_id`),
405 KEY `contact_fields_contact_field_type_id_foreign` (`contact_field_type_id`),
406 CONSTRAINT `contact_fields_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
407 CONSTRAINT `contact_fields_contact_field_type_id_foreign` FOREIGN KEY (`contact_field_type_id`) REFERENCES `monica_contact_field_types` (`id`) ON DELETE CASCADE,
408 CONSTRAINT `contact_fields_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
409) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
410/*!40101 SET character_set_client = @saved_cs_client */;
411
412--
413-- Dumping data for table `monica_contact_fields`
414--
415
416LOCK TABLES `monica_contact_fields` WRITE;
417/*!40000 ALTER TABLE `monica_contact_fields` DISABLE KEYS */;
418/*!40000 ALTER TABLE `monica_contact_fields` ENABLE KEYS */;
419UNLOCK TABLES;
420
421--
422-- Table structure for table `monica_contact_photo`
423--
424
425DROP TABLE IF EXISTS `monica_contact_photo`;
426/*!40101 SET @saved_cs_client = @@character_set_client */;
427/*!40101 SET character_set_client = utf8 */;
428CREATE TABLE `monica_contact_photo` (
429 `contact_id` int(10) unsigned NOT NULL,
430 `photo_id` int(10) unsigned NOT NULL,
431 `created_at` timestamp NULL DEFAULT NULL,
432 `updated_at` timestamp NULL DEFAULT NULL,
433 KEY `contact_photo_photo_id_foreign` (`photo_id`),
434 KEY `contact_photo_contact_id_foreign` (`contact_id`),
435 CONSTRAINT `contact_photo_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
436 CONSTRAINT `contact_photo_photo_id_foreign` FOREIGN KEY (`photo_id`) REFERENCES `monica_photos` (`id`) ON DELETE CASCADE
437) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
438/*!40101 SET character_set_client = @saved_cs_client */;
439
440--
441-- Dumping data for table `monica_contact_photo`
442--
443
444LOCK TABLES `monica_contact_photo` WRITE;
445/*!40000 ALTER TABLE `monica_contact_photo` DISABLE KEYS */;
446/*!40000 ALTER TABLE `monica_contact_photo` ENABLE KEYS */;
447UNLOCK TABLES;
448
449--
450-- Table structure for table `monica_contact_tag`
451--
452
453DROP TABLE IF EXISTS `monica_contact_tag`;
454/*!40101 SET @saved_cs_client = @@character_set_client */;
455/*!40101 SET character_set_client = utf8 */;
456CREATE TABLE `monica_contact_tag` (
457 `contact_id` int(11) NOT NULL,
458 `tag_id` int(11) NOT NULL,
459 `account_id` int(11) NOT NULL,
460 `created_at` timestamp NULL DEFAULT NULL,
461 `updated_at` timestamp NULL DEFAULT NULL
462) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
463/*!40101 SET character_set_client = @saved_cs_client */;
464
465--
466-- Dumping data for table `monica_contact_tag`
467--
468
469LOCK TABLES `monica_contact_tag` WRITE;
470/*!40000 ALTER TABLE `monica_contact_tag` DISABLE KEYS */;
471/*!40000 ALTER TABLE `monica_contact_tag` ENABLE KEYS */;
472UNLOCK TABLES;
473
474--
475-- Table structure for table `monica_contacts`
476--
477
478DROP TABLE IF EXISTS `monica_contacts`;
479/*!40101 SET @saved_cs_client = @@character_set_client */;
480/*!40101 SET character_set_client = utf8 */;
481CREATE TABLE `monica_contacts` (
482 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
483 `account_id` int(11) NOT NULL,
484 `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
485 `middle_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
486 `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
487 `nickname` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
488 `gender_id` int(11) NOT NULL,
489 `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
490 `uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
491 `is_starred` tinyint(1) NOT NULL DEFAULT '0',
492 `is_partial` tinyint(1) NOT NULL DEFAULT '0',
493 `is_active` tinyint(1) NOT NULL DEFAULT '1',
494 `is_dead` tinyint(1) NOT NULL DEFAULT '0',
495 `deceased_special_date_id` int(10) unsigned DEFAULT NULL,
496 `deceased_reminder_id` int(10) unsigned DEFAULT NULL,
497 `last_talked_to` date DEFAULT NULL,
498 `stay_in_touch_frequency` int(11) DEFAULT NULL,
499 `stay_in_touch_trigger_date` datetime DEFAULT NULL,
500 `birthday_special_date_id` int(10) unsigned DEFAULT NULL,
501 `birthday_reminder_id` int(10) unsigned DEFAULT NULL,
502 `first_met_through_contact_id` int(11) DEFAULT NULL,
503 `first_met_special_date_id` int(10) unsigned DEFAULT NULL,
504 `first_met_reminder_id` int(10) unsigned DEFAULT NULL,
505 `first_met_where` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
506 `first_met_additional_info` longtext COLLATE utf8mb4_unicode_ci,
507 `job` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
508 `company` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
509 `food_preferencies` longtext COLLATE utf8mb4_unicode_ci,
510 `has_avatar` tinyint(1) NOT NULL DEFAULT '0',
511 `avatar_external_url` varchar(400) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
512 `avatar_file_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
513 `avatar_location` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'local',
514 `gravatar_url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
515 `last_consulted_at` timestamp NULL DEFAULT NULL,
516 `number_of_views` int(11) NOT NULL DEFAULT '0',
517 `created_at` timestamp NULL DEFAULT NULL,
518 `updated_at` timestamp NULL DEFAULT NULL,
519 `default_avatar_color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
520 `has_avatar_bool` tinyint(1) NOT NULL DEFAULT '0',
521 PRIMARY KEY (`id`),
522 KEY `contacts_birthday_reminder_id_foreign` (`birthday_reminder_id`),
523 KEY `contacts_first_met_reminder_id_foreign` (`first_met_reminder_id`),
524 KEY `contacts_deceased_reminder_id_foreign` (`deceased_reminder_id`),
525 KEY `contacts_birthday_special_date_id_foreign` (`birthday_special_date_id`),
526 KEY `contacts_first_met_special_date_id_foreign` (`first_met_special_date_id`),
527 KEY `contacts_deceased_special_date_id_foreign` (`deceased_special_date_id`),
528 KEY `contacts_account_id_uuid_index` (`account_id`,`uuid`),
529 CONSTRAINT `contacts_birthday_reminder_id_foreign` FOREIGN KEY (`birthday_reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
530 CONSTRAINT `contacts_birthday_special_date_id_foreign` FOREIGN KEY (`birthday_special_date_id`) REFERENCES `monica_special_dates` (`id`) ON DELETE SET NULL,
531 CONSTRAINT `contacts_deceased_reminder_id_foreign` FOREIGN KEY (`deceased_reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
532 CONSTRAINT `contacts_deceased_special_date_id_foreign` FOREIGN KEY (`deceased_special_date_id`) REFERENCES `monica_special_dates` (`id`) ON DELETE SET NULL,
533 CONSTRAINT `contacts_first_met_reminder_id_foreign` FOREIGN KEY (`first_met_reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
534 CONSTRAINT `contacts_first_met_special_date_id_foreign` FOREIGN KEY (`first_met_special_date_id`) REFERENCES `monica_special_dates` (`id`) ON DELETE SET NULL
535) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
536/*!40101 SET character_set_client = @saved_cs_client */;
537
538--
539-- Dumping data for table `monica_contacts`
540--
541
542LOCK TABLES `monica_contacts` WRITE;
543/*!40000 ALTER TABLE `monica_contacts` DISABLE KEYS */;
544/*!40000 ALTER TABLE `monica_contacts` ENABLE KEYS */;
545UNLOCK TABLES;
546
547--
548-- Table structure for table `monica_conversations`
549--
550
551DROP TABLE IF EXISTS `monica_conversations`;
552/*!40101 SET @saved_cs_client = @@character_set_client */;
553/*!40101 SET character_set_client = utf8 */;
554CREATE TABLE `monica_conversations` (
555 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
556 `account_id` int(10) unsigned NOT NULL,
557 `contact_id` int(10) unsigned NOT NULL,
558 `contact_field_type_id` int(10) unsigned NOT NULL,
559 `happened_at` datetime NOT NULL,
560 `created_at` timestamp NULL DEFAULT NULL,
561 `updated_at` timestamp NULL DEFAULT NULL,
562 PRIMARY KEY (`id`),
563 KEY `conversations_account_id_foreign` (`account_id`),
564 KEY `conversations_contact_id_foreign` (`contact_id`),
565 KEY `conversations_contact_field_type_id_foreign` (`contact_field_type_id`),
566 CONSTRAINT `conversations_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
567 CONSTRAINT `conversations_contact_field_type_id_foreign` FOREIGN KEY (`contact_field_type_id`) REFERENCES `monica_contact_field_types` (`id`) ON DELETE CASCADE,
568 CONSTRAINT `conversations_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
569) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
570/*!40101 SET character_set_client = @saved_cs_client */;
571
572--
573-- Dumping data for table `monica_conversations`
574--
575
576LOCK TABLES `monica_conversations` WRITE;
577/*!40000 ALTER TABLE `monica_conversations` DISABLE KEYS */;
578/*!40000 ALTER TABLE `monica_conversations` ENABLE KEYS */;
579UNLOCK TABLES;
580
581--
582-- Table structure for table `monica_currencies`
583--
584
585DROP TABLE IF EXISTS `monica_currencies`;
586/*!40101 SET @saved_cs_client = @@character_set_client */;
587/*!40101 SET character_set_client = utf8 */;
588CREATE TABLE `monica_currencies` (
589 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
590 `iso` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
591 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
592 `symbol` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
593 `created_at` timestamp NULL DEFAULT NULL,
594 `updated_at` timestamp NULL DEFAULT NULL,
595 PRIMARY KEY (`id`)
596) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
597/*!40101 SET character_set_client = @saved_cs_client */;
598
599--
600-- Dumping data for table `monica_currencies`
601--
602
603LOCK TABLES `monica_currencies` WRITE;
604/*!40000 ALTER TABLE `monica_currencies` DISABLE KEYS */;
605INSERT INTO `monica_currencies` VALUES (1,'CAD','Canadian Dollar','$',NULL,NULL),(2,'USD','US Dollar','$',NULL,NULL),(3,'GBP','British Pound','£',NULL,NULL),(4,'EUR','Euro','€',NULL,NULL),(5,'RUB','Russian Ruble','₽',NULL,NULL),(6,'ZAR','South African Rand','R ',NULL,NULL),(7,'DKK','Danish krone','kr.',NULL,NULL),(8,'INR','Indian rupee','₹',NULL,NULL),(9,'BRL','Brazilian Real','R$',NULL,NULL);
606/*!40000 ALTER TABLE `monica_currencies` ENABLE KEYS */;
607UNLOCK TABLES;
608
609--
610-- Table structure for table `monica_days`
611--
612
613DROP TABLE IF EXISTS `monica_days`;
614/*!40101 SET @saved_cs_client = @@character_set_client */;
615/*!40101 SET character_set_client = utf8 */;
616CREATE TABLE `monica_days` (
617 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
618 `account_id` int(11) NOT NULL,
619 `date` date NOT NULL,
620 `rate` int(11) NOT NULL,
621 `comment` mediumtext COLLATE utf8mb4_unicode_ci,
622 `created_at` timestamp NULL DEFAULT NULL,
623 `updated_at` timestamp NULL DEFAULT NULL,
624 PRIMARY KEY (`id`)
625) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
626/*!40101 SET character_set_client = @saved_cs_client */;
627
628--
629-- Dumping data for table `monica_days`
630--
631
632LOCK TABLES `monica_days` WRITE;
633/*!40000 ALTER TABLE `monica_days` DISABLE KEYS */;
634/*!40000 ALTER TABLE `monica_days` ENABLE KEYS */;
635UNLOCK TABLES;
636
637--
638-- Table structure for table `monica_debts`
639--
640
641DROP TABLE IF EXISTS `monica_debts`;
642/*!40101 SET @saved_cs_client = @@character_set_client */;
643/*!40101 SET character_set_client = utf8 */;
644CREATE TABLE `monica_debts` (
645 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
646 `account_id` int(11) NOT NULL,
647 `contact_id` int(11) NOT NULL,
648 `in_debt` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no',
649 `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'inprogress',
650 `amount` decimal(8,2) NOT NULL,
651 `reason` longtext COLLATE utf8mb4_unicode_ci,
652 `created_at` timestamp NULL DEFAULT NULL,
653 `updated_at` timestamp NULL DEFAULT NULL,
654 PRIMARY KEY (`id`)
655) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
656/*!40101 SET character_set_client = @saved_cs_client */;
657
658--
659-- Dumping data for table `monica_debts`
660--
661
662LOCK TABLES `monica_debts` WRITE;
663/*!40000 ALTER TABLE `monica_debts` DISABLE KEYS */;
664/*!40000 ALTER TABLE `monica_debts` ENABLE KEYS */;
665UNLOCK TABLES;
666
667--
668-- Table structure for table `monica_default_activity_type_categories`
669--
670
671DROP TABLE IF EXISTS `monica_default_activity_type_categories`;
672/*!40101 SET @saved_cs_client = @@character_set_client */;
673/*!40101 SET character_set_client = utf8 */;
674CREATE TABLE `monica_default_activity_type_categories` (
675 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
676 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
677 `created_at` timestamp NULL DEFAULT NULL,
678 `updated_at` timestamp NULL DEFAULT NULL,
679 PRIMARY KEY (`id`)
680) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
681/*!40101 SET character_set_client = @saved_cs_client */;
682
683--
684-- Dumping data for table `monica_default_activity_type_categories`
685--
686
687LOCK TABLES `monica_default_activity_type_categories` WRITE;
688/*!40000 ALTER TABLE `monica_default_activity_type_categories` DISABLE KEYS */;
689INSERT INTO `monica_default_activity_type_categories` VALUES (1,'simple_activities','2019-02-20 15:38:58','2019-02-20 15:38:58'),(2,'sport','2019-02-20 15:38:58','2019-02-20 15:38:58'),(3,'food','2019-02-20 15:38:58','2019-02-20 15:38:58'),(4,'cultural_activities','2019-02-20 15:38:58','2019-02-20 15:38:58');
690/*!40000 ALTER TABLE `monica_default_activity_type_categories` ENABLE KEYS */;
691UNLOCK TABLES;
692
693--
694-- Table structure for table `monica_default_activity_types`
695--
696
697DROP TABLE IF EXISTS `monica_default_activity_types`;
698/*!40101 SET @saved_cs_client = @@character_set_client */;
699/*!40101 SET character_set_client = utf8 */;
700CREATE TABLE `monica_default_activity_types` (
701 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
702 `default_activity_type_category_id` int(11) NOT NULL,
703 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
704 `location_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
705 `created_at` timestamp NULL DEFAULT NULL,
706 `updated_at` timestamp NULL DEFAULT NULL,
707 PRIMARY KEY (`id`)
708) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
709/*!40101 SET character_set_client = @saved_cs_client */;
710
711--
712-- Dumping data for table `monica_default_activity_types`
713--
714
715LOCK TABLES `monica_default_activity_types` WRITE;
716/*!40000 ALTER TABLE `monica_default_activity_types` DISABLE KEYS */;
717INSERT INTO `monica_default_activity_types` VALUES (1,1,'just_hung_out','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(2,1,'watched_movie_at_home','my_place','2019-02-20 15:38:58','2019-02-20 15:38:58'),(3,1,'talked_at_home','my_place','2019-02-20 15:38:58','2019-02-20 15:38:58'),(4,2,'did_sport_activities_together','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(5,3,'ate_at_his_place','his_place','2019-02-20 15:38:58','2019-02-20 15:38:58'),(6,3,'went_bar','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(7,3,'ate_at_home','my_place','2019-02-20 15:38:58','2019-02-20 15:38:58'),(8,3,'picknicked','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(9,3,'ate_restaurant','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(10,4,'went_theater','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(11,4,'went_concert','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(12,4,'went_play','outside','2019-02-20 15:38:58','2019-02-20 15:38:58'),(13,4,'went_museum','outside','2019-02-20 15:38:58','2019-02-20 15:38:58');
718/*!40000 ALTER TABLE `monica_default_activity_types` ENABLE KEYS */;
719UNLOCK TABLES;
720
721--
722-- Table structure for table `monica_default_contact_field_types`
723--
724
725DROP TABLE IF EXISTS `monica_default_contact_field_types`;
726/*!40101 SET @saved_cs_client = @@character_set_client */;
727/*!40101 SET character_set_client = utf8 */;
728CREATE TABLE `monica_default_contact_field_types` (
729 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
730 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
731 `fontawesome_icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
732 `protocol` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
733 `migrated` tinyint(1) NOT NULL DEFAULT '0',
734 `delible` tinyint(1) NOT NULL DEFAULT '1',
735 `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
736 `created_at` timestamp NULL DEFAULT NULL,
737 `updated_at` timestamp NULL DEFAULT NULL,
738 PRIMARY KEY (`id`)
739) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
740/*!40101 SET character_set_client = @saved_cs_client */;
741
742--
743-- Dumping data for table `monica_default_contact_field_types`
744--
745
746LOCK TABLES `monica_default_contact_field_types` WRITE;
747/*!40000 ALTER TABLE `monica_default_contact_field_types` DISABLE KEYS */;
748INSERT INTO `monica_default_contact_field_types` VALUES (1,'Email','fa fa-envelope-open-o','mailto:',1,0,'email',NULL,NULL),(2,'Phone','fa fa-volume-control-phone','tel:',1,0,'phone',NULL,NULL),(3,'Facebook','fa fa-facebook-official',NULL,1,1,NULL,NULL,NULL),(4,'Twitter','fa fa-twitter-square',NULL,1,1,NULL,NULL,NULL),(5,'Whatsapp','fa fa-whatsapp',NULL,1,1,NULL,NULL,NULL),(6,'Telegram','fa fa-telegram','telegram:',1,1,NULL,NULL,NULL),(7,'LinkedIn','fa fa-linkedin-square',NULL,1,1,NULL,NULL,NULL);
749/*!40000 ALTER TABLE `monica_default_contact_field_types` ENABLE KEYS */;
750UNLOCK TABLES;
751
752--
753-- Table structure for table `monica_default_contact_modules`
754--
755
756DROP TABLE IF EXISTS `monica_default_contact_modules`;
757/*!40101 SET @saved_cs_client = @@character_set_client */;
758/*!40101 SET character_set_client = utf8 */;
759CREATE TABLE `monica_default_contact_modules` (
760 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
761 `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
762 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
763 `delible` tinyint(1) NOT NULL DEFAULT '0',
764 `active` tinyint(1) NOT NULL DEFAULT '1',
765 `migrated` tinyint(1) NOT NULL DEFAULT '0',
766 `created_at` timestamp NULL DEFAULT NULL,
767 `updated_at` timestamp NULL DEFAULT NULL,
768 PRIMARY KEY (`id`)
769) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
770/*!40101 SET character_set_client = @saved_cs_client */;
771
772--
773-- Dumping data for table `monica_default_contact_modules`
774--
775
776LOCK TABLES `monica_default_contact_modules` WRITE;
777/*!40000 ALTER TABLE `monica_default_contact_modules` DISABLE KEYS */;
778INSERT INTO `monica_default_contact_modules` VALUES (1,'love_relationships','app.relationship_type_group_love',0,1,1,NULL,NULL),(2,'family_relationships','app.relationship_type_group_family',0,1,1,NULL,NULL),(3,'other_relationships','app.relationship_type_group_other',0,1,1,NULL,NULL),(4,'pets','people.pets_title',0,1,1,NULL,NULL),(5,'contact_information','people.section_contact_information',0,1,1,NULL,NULL),(6,'addresses','people.contact_address_title',0,1,1,NULL,NULL),(7,'how_you_met','people.introductions_sidebar_title',0,1,1,NULL,NULL),(8,'work_information','people.work_information',0,1,1,NULL,NULL),(9,'food_preferences','people.food_preferencies_title',0,1,1,NULL,NULL),(10,'notes','people.section_personal_notes',0,1,1,NULL,NULL),(11,'phone_calls','people.call_title',0,1,1,NULL,NULL),(12,'activities','people.activity_title',0,1,1,NULL,NULL),(13,'reminders','people.section_personal_reminders',0,1,1,NULL,NULL),(14,'tasks','people.section_personal_tasks',0,1,1,NULL,NULL),(15,'gifts','people.gifts_title',0,1,1,NULL,NULL),(16,'debts','people.debt_title',0,1,1,NULL,NULL),(17,'conversations','people.conversation_list_title',0,1,1,NULL,NULL),(18,'documents','people.document_list_title',0,1,1,NULL,NULL);
779/*!40000 ALTER TABLE `monica_default_contact_modules` ENABLE KEYS */;
780UNLOCK TABLES;
781
782--
783-- Table structure for table `monica_default_life_event_categories`
784--
785
786DROP TABLE IF EXISTS `monica_default_life_event_categories`;
787/*!40101 SET @saved_cs_client = @@character_set_client */;
788/*!40101 SET character_set_client = utf8 */;
789CREATE TABLE `monica_default_life_event_categories` (
790 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
791 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
792 `migrated` tinyint(1) NOT NULL DEFAULT '0',
793 `created_at` timestamp NULL DEFAULT NULL,
794 `updated_at` timestamp NULL DEFAULT NULL,
795 PRIMARY KEY (`id`)
796) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
797/*!40101 SET character_set_client = @saved_cs_client */;
798
799--
800-- Dumping data for table `monica_default_life_event_categories`
801--
802
803LOCK TABLES `monica_default_life_event_categories` WRITE;
804/*!40000 ALTER TABLE `monica_default_life_event_categories` DISABLE KEYS */;
805INSERT INTO `monica_default_life_event_categories` VALUES (1,'work_education',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(2,'family_relationships',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(3,'home_living',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(4,'health_wellness',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(5,'travel_experiences',0,'2019-02-20 15:39:01','2019-02-20 15:39:01');
806/*!40000 ALTER TABLE `monica_default_life_event_categories` ENABLE KEYS */;
807UNLOCK TABLES;
808
809--
810-- Table structure for table `monica_default_life_event_types`
811--
812
813DROP TABLE IF EXISTS `monica_default_life_event_types`;
814/*!40101 SET @saved_cs_client = @@character_set_client */;
815/*!40101 SET character_set_client = utf8 */;
816CREATE TABLE `monica_default_life_event_types` (
817 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
818 `default_life_event_category_id` int(10) unsigned NOT NULL,
819 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
820 `specific_information_structure` text COLLATE utf8mb4_unicode_ci,
821 `migrated` tinyint(1) NOT NULL DEFAULT '0',
822 `created_at` timestamp NULL DEFAULT NULL,
823 `updated_at` timestamp NULL DEFAULT NULL,
824 PRIMARY KEY (`id`),
825 KEY `default_life_event_types_default_life_event_category_id_foreign` (`default_life_event_category_id`),
826 CONSTRAINT `default_life_event_types_default_life_event_category_id_foreign` FOREIGN KEY (`default_life_event_category_id`) REFERENCES `monica_default_life_event_categories` (`id`) ON DELETE CASCADE
827) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
828/*!40101 SET character_set_client = @saved_cs_client */;
829
830--
831-- Dumping data for table `monica_default_life_event_types`
832--
833
834LOCK TABLES `monica_default_life_event_types` WRITE;
835/*!40000 ALTER TABLE `monica_default_life_event_types` DISABLE KEYS */;
836INSERT INTO `monica_default_life_event_types` VALUES (1,1,'new_job','{\"employer\": {\"type\": \"string\", \"value\": \"\"}, \"job_title\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(2,1,'retirement','{\"profession\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(3,1,'new_school','{\"degree\": {\"type\": \"string\", \"value\": \"\"}, \"end_date\": {\"type\": \"date\", \"value\": \"\"}, \"end_date_reminder_id\": {\"type\": \"integer\", \"value\": \"\"}, \"school_name\": {\"type\": \"string\", \"value\": \"\"}, \"studying\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(4,1,'study_abroad','{\"degree\": {\"type\": \"string\", \"value\": \"\"}, \"end_date\": {\"type\": \"date\", \"value\": \"\"}, \"end_date_reminder_id\": {\"type\": \"integer\", \"value\": \"\"}, \"school_name\": {\"type\": \"string\", \"value\": \"\"}, \"studying\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(5,1,'volunteer_work','{\"organization\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(6,1,'published_book_or_paper','{\"full_citation\": {\"type\": \"string\", \"value\": \"\"}, \"url\": {\"type\": \"string\", \"value\": \"\"}, \"citation\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(7,1,'military_service','{\"end_date\": {\"type\": \"date\", \"value\": \"\"}, \"end_date_reminder_id\": {\"type\": \"integer\", \"value\": \"\"}, \"branch\": {\"type\": \"string\", \"value\": \"\"}, \"division\": {\"type\": \"string\", \"value\": \"\"}, \"country\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(8,2,'new_relationship',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(9,2,'engagement','{\"with_contact_id\": {\"type\": \"integer\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(10,2,'marriage','{\"with_contact_id\": {\"type\": \"integer\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(11,2,'anniversary',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(12,2,'expecting_a_baby','{\"contact_id\": {\"type\": \"integer\", \"value\": \"\"}, \"expected_date\": {\"type\": \"date\", \"value\": \"\"}, \"expected_date_reminder_id\": {\"type\": \"integer\", \"value\": \"\"}, \"expected_gender\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(13,2,'new_child',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(14,2,'new_family_member',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(15,2,'new_pet',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(16,2,'end_of_relationship','{\"breakup_reason\": {\"type\": \"string\", \"value\": \"\"}, \"who_broke_up_contact_id\": {\"type\": \"integer\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(17,2,'loss_of_a_loved_one',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(18,3,'moved','{\"where_to\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(19,3,'bought_a_home','{\"address\": {\"type\": \"string\", \"value\": \"\"}, \"estimated_value\": {\"type\": \"number\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(20,3,'home_improvement',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(21,3,'holidays','{\"where\": {\"type\": \"string\", \"value\": \"\"}, \"duration_in_days\": {\"type\": \"integer\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(22,3,'new_vehicle','{\"type\": {\"type\": \"string\", \"value\": \"\"}, \"model\": {\"type\": \"string\", \"value\": \"\"}, \"model_year\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(23,3,'new_roommate','{\"contact_id\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(24,4,'overcame_an_illness',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(25,4,'quit_a_habit',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(26,4,'new_eating_habits',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(27,4,'weight_loss','{\"amount\": {\"type\": \"string\", \"value\": \"\"}, \"unit\": {\"type\": \"string\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(28,4,'wear_glass_or_contact',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(29,4,'broken_bone',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(30,4,'removed_braces',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(31,4,'surgery','{\"nature\": {\"type\": \"string\", \"value\": \"\"}, \"number_days_in_hospital\": {\"type\": \"integer\", \"value\": \"\"}, \"number_days_in_hospital\": {\"type\": \"integer\", \"value\": \"\"}, \"expected_date_out_of_hospital_reminder_id\": {\"type\": \"integer\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(32,4,'dentist',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(33,5,'new_sport',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(34,5,'new_hobby',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(35,5,'new_instrument',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(36,5,'new_language',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(37,5,'tattoo_or_piercing',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(38,5,'new_license',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(39,5,'travel','{\"visited_place\": {\"type\": \"string\", \"value\": \"\"}, \"duration_in_days\": {\"type\": \"integer\", \"value\": \"\"}}',0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(40,5,'achievement_or_award',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(41,5,'changed_beliefs',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(42,5,'first_word',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01'),(43,5,'first_kiss',NULL,0,'2019-02-20 15:39:01','2019-02-20 15:39:01');
837/*!40000 ALTER TABLE `monica_default_life_event_types` ENABLE KEYS */;
838UNLOCK TABLES;
839
840--
841-- Table structure for table `monica_default_relationship_type_groups`
842--
843
844DROP TABLE IF EXISTS `monica_default_relationship_type_groups`;
845/*!40101 SET @saved_cs_client = @@character_set_client */;
846/*!40101 SET character_set_client = utf8 */;
847CREATE TABLE `monica_default_relationship_type_groups` (
848 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
849 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
850 `delible` tinyint(1) NOT NULL DEFAULT '0',
851 `migrated` tinyint(1) NOT NULL DEFAULT '0',
852 `created_at` timestamp NULL DEFAULT NULL,
853 `updated_at` timestamp NULL DEFAULT NULL,
854 PRIMARY KEY (`id`)
855) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
856/*!40101 SET character_set_client = @saved_cs_client */;
857
858--
859-- Dumping data for table `monica_default_relationship_type_groups`
860--
861
862LOCK TABLES `monica_default_relationship_type_groups` WRITE;
863/*!40000 ALTER TABLE `monica_default_relationship_type_groups` DISABLE KEYS */;
864INSERT INTO `monica_default_relationship_type_groups` VALUES (1,'love',0,1,NULL,NULL),(2,'family',0,1,NULL,NULL),(3,'friend',0,1,NULL,NULL),(4,'work',0,1,NULL,NULL);
865/*!40000 ALTER TABLE `monica_default_relationship_type_groups` ENABLE KEYS */;
866UNLOCK TABLES;
867
868--
869-- Table structure for table `monica_default_relationship_types`
870--
871
872DROP TABLE IF EXISTS `monica_default_relationship_types`;
873/*!40101 SET @saved_cs_client = @@character_set_client */;
874/*!40101 SET character_set_client = utf8 */;
875CREATE TABLE `monica_default_relationship_types` (
876 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
877 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
878 `name_reverse_relationship` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
879 `relationship_type_group_id` int(11) NOT NULL,
880 `delible` tinyint(1) NOT NULL DEFAULT '0',
881 `migrated` tinyint(1) NOT NULL DEFAULT '0',
882 `created_at` timestamp NULL DEFAULT NULL,
883 `updated_at` timestamp NULL DEFAULT NULL,
884 PRIMARY KEY (`id`)
885) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
886/*!40101 SET character_set_client = @saved_cs_client */;
887
888--
889-- Dumping data for table `monica_default_relationship_types`
890--
891
892LOCK TABLES `monica_default_relationship_types` WRITE;
893/*!40000 ALTER TABLE `monica_default_relationship_types` DISABLE KEYS */;
894INSERT INTO `monica_default_relationship_types` VALUES (1,'partner','partner',1,0,1,NULL,NULL),(2,'spouse','spouse',1,0,1,NULL,NULL),(3,'date','date',1,0,1,NULL,NULL),(4,'lover','lover',1,0,1,NULL,NULL),(5,'inlovewith','lovedby',1,0,1,NULL,NULL),(6,'lovedby','inlovewith',1,0,1,NULL,NULL),(7,'ex','ex',1,0,1,NULL,NULL),(8,'parent','child',2,0,1,NULL,NULL),(9,'child','parent',2,0,1,NULL,NULL),(10,'sibling','sibling',2,0,1,NULL,NULL),(11,'grandparent','grandchild',2,0,1,NULL,NULL),(12,'grandchild','grandparent',2,0,1,NULL,NULL),(13,'uncle','nephew',2,0,1,NULL,NULL),(14,'nephew','uncle',2,0,1,NULL,NULL),(15,'cousin','cousin',2,0,1,NULL,NULL),(16,'godfather','godson',2,0,1,NULL,NULL),(17,'godson','godfather',2,0,1,NULL,NULL),(18,'friend','friend',3,0,1,NULL,NULL),(19,'bestfriend','bestfriend',3,0,1,NULL,NULL),(20,'colleague','colleague',4,0,1,NULL,NULL),(21,'boss','subordinate',4,0,1,NULL,NULL),(22,'subordinate','boss',4,0,1,NULL,NULL),(23,'mentor','protege',4,0,1,NULL,NULL),(24,'protege','mentor',4,0,1,NULL,NULL),(25,'ex_husband','ex_husband',1,0,1,NULL,NULL);
895/*!40000 ALTER TABLE `monica_default_relationship_types` ENABLE KEYS */;
896UNLOCK TABLES;
897
898--
899-- Table structure for table `monica_documents`
900--
901
902DROP TABLE IF EXISTS `monica_documents`;
903/*!40101 SET @saved_cs_client = @@character_set_client */;
904/*!40101 SET character_set_client = utf8 */;
905CREATE TABLE `monica_documents` (
906 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
907 `account_id` int(10) unsigned NOT NULL,
908 `contact_id` int(10) unsigned NOT NULL,
909 `original_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
910 `new_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
911 `filesize` int(11) DEFAULT NULL,
912 `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
913 `mime_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
914 `number_of_downloads` int(11) NOT NULL DEFAULT '0',
915 `created_at` timestamp NULL DEFAULT NULL,
916 `updated_at` timestamp NULL DEFAULT NULL,
917 PRIMARY KEY (`id`),
918 KEY `documents_account_id_foreign` (`account_id`),
919 KEY `documents_contact_id_foreign` (`contact_id`),
920 CONSTRAINT `documents_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
921 CONSTRAINT `documents_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
922) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
923/*!40101 SET character_set_client = @saved_cs_client */;
924
925--
926-- Dumping data for table `monica_documents`
927--
928
929LOCK TABLES `monica_documents` WRITE;
930/*!40000 ALTER TABLE `monica_documents` DISABLE KEYS */;
931/*!40000 ALTER TABLE `monica_documents` ENABLE KEYS */;
932UNLOCK TABLES;
933
934--
935-- Table structure for table `monica_emotion_call`
936--
937
938DROP TABLE IF EXISTS `monica_emotion_call`;
939/*!40101 SET @saved_cs_client = @@character_set_client */;
940/*!40101 SET character_set_client = utf8 */;
941CREATE TABLE `monica_emotion_call` (
942 `account_id` int(10) unsigned NOT NULL,
943 `call_id` int(10) unsigned NOT NULL,
944 `emotion_id` int(10) unsigned NOT NULL,
945 `contact_id` int(10) unsigned NOT NULL,
946 `created_at` timestamp NULL DEFAULT NULL,
947 `updated_at` timestamp NULL DEFAULT NULL,
948 KEY `emotion_call_account_id_foreign` (`account_id`),
949 KEY `emotion_call_call_id_foreign` (`call_id`),
950 KEY `emotion_call_emotion_id_foreign` (`emotion_id`),
951 KEY `emotion_call_contact_id_foreign` (`contact_id`),
952 CONSTRAINT `emotion_call_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
953 CONSTRAINT `emotion_call_call_id_foreign` FOREIGN KEY (`call_id`) REFERENCES `monica_calls` (`id`) ON DELETE CASCADE,
954 CONSTRAINT `emotion_call_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
955 CONSTRAINT `emotion_call_emotion_id_foreign` FOREIGN KEY (`emotion_id`) REFERENCES `monica_emotions` (`id`) ON DELETE CASCADE
956) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
957/*!40101 SET character_set_client = @saved_cs_client */;
958
959--
960-- Dumping data for table `monica_emotion_call`
961--
962
963LOCK TABLES `monica_emotion_call` WRITE;
964/*!40000 ALTER TABLE `monica_emotion_call` DISABLE KEYS */;
965/*!40000 ALTER TABLE `monica_emotion_call` ENABLE KEYS */;
966UNLOCK TABLES;
967
968--
969-- Table structure for table `monica_emotions`
970--
971
972DROP TABLE IF EXISTS `monica_emotions`;
973/*!40101 SET @saved_cs_client = @@character_set_client */;
974/*!40101 SET character_set_client = utf8 */;
975CREATE TABLE `monica_emotions` (
976 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
977 `emotion_primary_id` int(10) unsigned NOT NULL,
978 `emotion_secondary_id` int(10) unsigned NOT NULL,
979 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
980 `created_at` timestamp NULL DEFAULT NULL,
981 `updated_at` timestamp NULL DEFAULT NULL,
982 PRIMARY KEY (`id`),
983 KEY `emotions_emotion_primary_id_foreign` (`emotion_primary_id`),
984 KEY `emotions_emotion_secondary_id_foreign` (`emotion_secondary_id`),
985 CONSTRAINT `emotions_emotion_primary_id_foreign` FOREIGN KEY (`emotion_primary_id`) REFERENCES `monica_emotions_primary` (`id`) ON DELETE CASCADE,
986 CONSTRAINT `emotions_emotion_secondary_id_foreign` FOREIGN KEY (`emotion_secondary_id`) REFERENCES `monica_emotions_secondary` (`id`) ON DELETE CASCADE
987) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
988/*!40101 SET character_set_client = @saved_cs_client */;
989
990--
991-- Dumping data for table `monica_emotions`
992--
993
994LOCK TABLES `monica_emotions` WRITE;
995/*!40000 ALTER TABLE `monica_emotions` DISABLE KEYS */;
996INSERT INTO `monica_emotions` VALUES (1,1,1,'adoration',NULL,NULL),(2,1,1,'affection',NULL,NULL),(3,1,1,'love',NULL,NULL),(4,1,1,'fondness',NULL,NULL),(5,1,1,'liking',NULL,NULL),(6,1,1,'attraction',NULL,NULL),(7,1,1,'caring',NULL,NULL),(8,1,1,'tenderness',NULL,NULL),(9,1,1,'compassion',NULL,NULL),(10,1,1,'sentimentality',NULL,NULL),(11,1,2,'arousal',NULL,NULL),(12,1,2,'desire',NULL,NULL),(13,1,2,'lust',NULL,NULL),(14,1,2,'passion',NULL,NULL),(15,1,2,'infatuation',NULL,NULL),(16,1,3,'longing',NULL,NULL),(17,2,4,'amusement',NULL,NULL),(18,2,4,'bliss',NULL,NULL),(19,2,4,'cheerfulness',NULL,NULL),(20,2,4,'gaiety',NULL,NULL),(21,2,4,'glee',NULL,NULL),(22,2,4,'jolliness',NULL,NULL),(23,2,4,'joviality',NULL,NULL),(24,2,4,'joy',NULL,NULL),(25,2,4,'delight',NULL,NULL),(26,2,4,'enjoyment',NULL,NULL),(27,2,4,'gladness',NULL,NULL),(28,2,4,'happiness',NULL,NULL),(29,2,4,'jubilation',NULL,NULL),(30,2,4,'elation',NULL,NULL),(31,2,4,'satisfaction',NULL,NULL),(32,2,4,'ecstasy',NULL,NULL),(33,2,4,'euphoria',NULL,NULL),(34,2,5,'enthusiasm',NULL,NULL),(35,2,5,'zeal',NULL,NULL),(36,2,5,'zest',NULL,NULL),(37,2,5,'excitement',NULL,NULL),(38,2,5,'thrill',NULL,NULL),(39,2,5,'exhilaration',NULL,NULL),(40,2,6,'contentment',NULL,NULL),(41,2,6,'pleasure',NULL,NULL),(42,2,7,'pride',NULL,NULL),(43,2,7,'pleasure',NULL,NULL),(44,2,8,'eagerness',NULL,NULL),(45,2,8,'hope',NULL,NULL),(46,2,9,'enthrallment',NULL,NULL),(47,2,9,'rapture',NULL,NULL),(48,2,10,'relief',NULL,NULL),(49,3,11,'amazement',NULL,NULL),(50,3,11,'surprise',NULL,NULL),(51,3,11,'astonishment',NULL,NULL),(52,4,12,'aggravation',NULL,NULL),(53,4,12,'irritation',NULL,NULL),(54,4,12,'agitation',NULL,NULL),(55,4,12,'annoyance',NULL,NULL),(56,4,12,'grouchiness',NULL,NULL),(57,4,12,'grumpiness',NULL,NULL),(58,4,13,'exasperation',NULL,NULL),(59,4,13,'frustration',NULL,NULL),(60,4,14,'anger',NULL,NULL),(61,4,14,'rage',NULL,NULL),(62,4,14,'outrage',NULL,NULL),(63,4,14,'fury',NULL,NULL),(64,4,14,'wrath',NULL,NULL),(65,4,14,'hostility',NULL,NULL),(66,4,14,'ferocity',NULL,NULL),(67,4,14,'bitterness',NULL,NULL),(68,4,14,'hate',NULL,NULL),(69,4,14,'loathing',NULL,NULL),(70,4,14,'scorn',NULL,NULL),(71,4,14,'spite',NULL,NULL),(72,4,14,'vengefulness',NULL,NULL),(73,4,14,'dislike',NULL,NULL),(74,4,14,'resentment',NULL,NULL),(75,4,15,'disgust',NULL,NULL),(76,4,15,'revulsion',NULL,NULL),(77,4,15,'contempt',NULL,NULL),(78,4,16,'envy',NULL,NULL),(79,4,16,'jealousy',NULL,NULL),(80,5,17,'agony',NULL,NULL),(81,5,17,'suffering',NULL,NULL),(82,5,17,'hurt',NULL,NULL),(83,5,17,'anguish',NULL,NULL),(84,5,18,'depression',NULL,NULL),(85,5,18,'despair',NULL,NULL),(86,5,18,'hopelessness',NULL,NULL),(87,5,18,'gloom',NULL,NULL),(88,5,18,'glumness',NULL,NULL),(89,5,18,'sadness',NULL,NULL),(90,5,18,'unhappiness',NULL,NULL),(91,5,18,'grief',NULL,NULL),(92,5,18,'sorrow',NULL,NULL),(93,5,18,'woe',NULL,NULL),(94,5,18,'misery',NULL,NULL),(95,5,18,'melancholy',NULL,NULL),(96,5,19,'dismay',NULL,NULL),(97,5,19,'disappointment',NULL,NULL),(98,5,19,'displeasure',NULL,NULL),(99,5,20,'guilt',NULL,NULL),(100,5,20,'shame',NULL,NULL),(101,5,20,'regret',NULL,NULL),(102,5,20,'remorse',NULL,NULL),(103,5,21,'alienation',NULL,NULL),(104,5,21,'isolation',NULL,NULL),(105,5,21,'neglect',NULL,NULL),(106,5,21,'loneliness',NULL,NULL),(107,5,21,'rejection',NULL,NULL),(108,5,21,'homesickness',NULL,NULL),(109,5,21,'defeat',NULL,NULL),(110,5,21,'dejection',NULL,NULL),(111,5,21,'insecurity',NULL,NULL),(112,5,21,'embarrassment',NULL,NULL),(113,5,21,'humiliation',NULL,NULL),(114,5,21,'insult',NULL,NULL),(115,5,22,'pity',NULL,NULL),(116,5,22,'sympathy',NULL,NULL),(117,6,23,'alarm',NULL,NULL),(118,6,23,'shock',NULL,NULL),(119,6,23,'fear',NULL,NULL),(120,6,23,'fright',NULL,NULL),(121,6,23,'horror',NULL,NULL),(122,6,23,'terror',NULL,NULL),(123,6,23,'panic',NULL,NULL),(124,6,23,'hysteria',NULL,NULL),(125,6,23,'mortification',NULL,NULL),(126,6,24,'anxiety',NULL,NULL),(127,6,24,'nervousness',NULL,NULL),(128,6,24,'tenseness',NULL,NULL),(129,6,24,'uneasiness',NULL,NULL),(130,6,24,'apprehension',NULL,NULL),(131,6,24,'worry',NULL,NULL),(132,6,24,'distress',NULL,NULL),(133,6,24,'dread',NULL,NULL);
997/*!40000 ALTER TABLE `monica_emotions` ENABLE KEYS */;
998UNLOCK TABLES;
999
1000--
1001-- Table structure for table `monica_emotions_primary`
1002--
1003
1004DROP TABLE IF EXISTS `monica_emotions_primary`;
1005/*!40101 SET @saved_cs_client = @@character_set_client */;
1006/*!40101 SET character_set_client = utf8 */;
1007CREATE TABLE `monica_emotions_primary` (
1008 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1009 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1010 `created_at` timestamp NULL DEFAULT NULL,
1011 `updated_at` timestamp NULL DEFAULT NULL,
1012 PRIMARY KEY (`id`)
1013) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1014/*!40101 SET character_set_client = @saved_cs_client */;
1015
1016--
1017-- Dumping data for table `monica_emotions_primary`
1018--
1019
1020LOCK TABLES `monica_emotions_primary` WRITE;
1021/*!40000 ALTER TABLE `monica_emotions_primary` DISABLE KEYS */;
1022INSERT INTO `monica_emotions_primary` VALUES (1,'love',NULL,NULL),(2,'joy',NULL,NULL),(3,'surprise',NULL,NULL),(4,'anger',NULL,NULL),(5,'sadness',NULL,NULL),(6,'fear',NULL,NULL);
1023/*!40000 ALTER TABLE `monica_emotions_primary` ENABLE KEYS */;
1024UNLOCK TABLES;
1025
1026--
1027-- Table structure for table `monica_emotions_secondary`
1028--
1029
1030DROP TABLE IF EXISTS `monica_emotions_secondary`;
1031/*!40101 SET @saved_cs_client = @@character_set_client */;
1032/*!40101 SET character_set_client = utf8 */;
1033CREATE TABLE `monica_emotions_secondary` (
1034 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1035 `emotion_primary_id` int(10) unsigned NOT NULL,
1036 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1037 `created_at` timestamp NULL DEFAULT NULL,
1038 `updated_at` timestamp NULL DEFAULT NULL,
1039 PRIMARY KEY (`id`),
1040 KEY `emotions_secondary_emotion_primary_id_foreign` (`emotion_primary_id`),
1041 CONSTRAINT `emotions_secondary_emotion_primary_id_foreign` FOREIGN KEY (`emotion_primary_id`) REFERENCES `monica_emotions_primary` (`id`) ON DELETE CASCADE
1042) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1043/*!40101 SET character_set_client = @saved_cs_client */;
1044
1045--
1046-- Dumping data for table `monica_emotions_secondary`
1047--
1048
1049LOCK TABLES `monica_emotions_secondary` WRITE;
1050/*!40000 ALTER TABLE `monica_emotions_secondary` DISABLE KEYS */;
1051INSERT INTO `monica_emotions_secondary` VALUES (1,1,'affection',NULL,NULL),(2,1,'lust',NULL,NULL),(3,1,'longing',NULL,NULL),(4,2,'cheerfulness',NULL,NULL),(5,2,'zest',NULL,NULL),(6,2,'contentment',NULL,NULL),(7,2,'pride',NULL,NULL),(8,2,'optimism',NULL,NULL),(9,2,'enthrallment',NULL,NULL),(10,2,'relief',NULL,NULL),(11,3,'surprise',NULL,NULL),(12,4,'irritation',NULL,NULL),(13,4,'exasperation',NULL,NULL),(14,4,'rage',NULL,NULL),(15,4,'disgust',NULL,NULL),(16,4,'envy',NULL,NULL),(17,5,'suffering',NULL,NULL),(18,5,'sadness',NULL,NULL),(19,5,'disappointment',NULL,NULL),(20,5,'shame',NULL,NULL),(21,5,'neglect',NULL,NULL),(22,5,'sympathy',NULL,NULL),(23,6,'horror',NULL,NULL),(24,6,'nervousness',NULL,NULL);
1052/*!40000 ALTER TABLE `monica_emotions_secondary` ENABLE KEYS */;
1053UNLOCK TABLES;
1054
1055--
1056-- Table structure for table `monica_entries`
1057--
1058
1059DROP TABLE IF EXISTS `monica_entries`;
1060/*!40101 SET @saved_cs_client = @@character_set_client */;
1061/*!40101 SET character_set_client = utf8 */;
1062CREATE TABLE `monica_entries` (
1063 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1064 `account_id` int(11) NOT NULL,
1065 `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1066 `post` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
1067 `created_at` timestamp NULL DEFAULT NULL,
1068 `updated_at` timestamp NULL DEFAULT NULL,
1069 PRIMARY KEY (`id`)
1070) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1071/*!40101 SET character_set_client = @saved_cs_client */;
1072
1073--
1074-- Dumping data for table `monica_entries`
1075--
1076
1077LOCK TABLES `monica_entries` WRITE;
1078/*!40000 ALTER TABLE `monica_entries` DISABLE KEYS */;
1079/*!40000 ALTER TABLE `monica_entries` ENABLE KEYS */;
1080UNLOCK TABLES;
1081
1082--
1083-- Table structure for table `monica_failed_jobs`
1084--
1085
1086DROP TABLE IF EXISTS `monica_failed_jobs`;
1087/*!40101 SET @saved_cs_client = @@character_set_client */;
1088/*!40101 SET character_set_client = utf8 */;
1089CREATE TABLE `monica_failed_jobs` (
1090 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1091 `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
1092 `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
1093 `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
1094 `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
1095 `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1096 PRIMARY KEY (`id`)
1097) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1098/*!40101 SET character_set_client = @saved_cs_client */;
1099
1100--
1101-- Dumping data for table `monica_failed_jobs`
1102--
1103
1104LOCK TABLES `monica_failed_jobs` WRITE;
1105/*!40000 ALTER TABLE `monica_failed_jobs` DISABLE KEYS */;
1106/*!40000 ALTER TABLE `monica_failed_jobs` ENABLE KEYS */;
1107UNLOCK TABLES;
1108
1109--
1110-- Table structure for table `monica_genders`
1111--
1112
1113DROP TABLE IF EXISTS `monica_genders`;
1114/*!40101 SET @saved_cs_client = @@character_set_client */;
1115/*!40101 SET character_set_client = utf8 */;
1116CREATE TABLE `monica_genders` (
1117 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1118 `account_id` int(11) NOT NULL,
1119 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1120 `created_at` timestamp NULL DEFAULT NULL,
1121 `updated_at` timestamp NULL DEFAULT NULL,
1122 PRIMARY KEY (`id`)
1123) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1124/*!40101 SET character_set_client = @saved_cs_client */;
1125
1126--
1127-- Dumping data for table `monica_genders`
1128--
1129
1130LOCK TABLES `monica_genders` WRITE;
1131/*!40000 ALTER TABLE `monica_genders` DISABLE KEYS */;
1132/*!40000 ALTER TABLE `monica_genders` ENABLE KEYS */;
1133UNLOCK TABLES;
1134
1135--
1136-- Table structure for table `monica_gifts`
1137--
1138
1139DROP TABLE IF EXISTS `monica_gifts`;
1140/*!40101 SET @saved_cs_client = @@character_set_client */;
1141/*!40101 SET character_set_client = utf8 */;
1142CREATE TABLE `monica_gifts` (
1143 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1144 `account_id` int(11) NOT NULL,
1145 `contact_id` int(11) NOT NULL,
1146 `is_for` int(11) DEFAULT NULL,
1147 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1148 `comment` longtext COLLATE utf8mb4_unicode_ci,
1149 `url` longtext COLLATE utf8mb4_unicode_ci,
1150 `value` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1151 `is_an_idea` tinyint(1) NOT NULL,
1152 `has_been_offered` tinyint(1) NOT NULL,
1153 `has_been_received` tinyint(1) DEFAULT NULL,
1154 `offered_at` datetime DEFAULT NULL,
1155 `received_at` datetime DEFAULT NULL,
1156 `created_at` timestamp NULL DEFAULT NULL,
1157 `updated_at` timestamp NULL DEFAULT NULL,
1158 PRIMARY KEY (`id`)
1159) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1160/*!40101 SET character_set_client = @saved_cs_client */;
1161
1162--
1163-- Dumping data for table `monica_gifts`
1164--
1165
1166LOCK TABLES `monica_gifts` WRITE;
1167/*!40000 ALTER TABLE `monica_gifts` DISABLE KEYS */;
1168/*!40000 ALTER TABLE `monica_gifts` ENABLE KEYS */;
1169UNLOCK TABLES;
1170
1171--
1172-- Table structure for table `monica_import_job_reports`
1173--
1174
1175DROP TABLE IF EXISTS `monica_import_job_reports`;
1176/*!40101 SET @saved_cs_client = @@character_set_client */;
1177/*!40101 SET character_set_client = utf8 */;
1178CREATE TABLE `monica_import_job_reports` (
1179 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1180 `account_id` int(11) NOT NULL,
1181 `user_id` int(11) NOT NULL,
1182 `import_job_id` int(11) NOT NULL,
1183 `contact_information` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
1184 `skipped` tinyint(1) NOT NULL,
1185 `skip_reason` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1186 `created_at` timestamp NULL DEFAULT NULL,
1187 `updated_at` timestamp NULL DEFAULT NULL,
1188 PRIMARY KEY (`id`)
1189) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1190/*!40101 SET character_set_client = @saved_cs_client */;
1191
1192--
1193-- Dumping data for table `monica_import_job_reports`
1194--
1195
1196LOCK TABLES `monica_import_job_reports` WRITE;
1197/*!40000 ALTER TABLE `monica_import_job_reports` DISABLE KEYS */;
1198/*!40000 ALTER TABLE `monica_import_job_reports` ENABLE KEYS */;
1199UNLOCK TABLES;
1200
1201--
1202-- Table structure for table `monica_import_jobs`
1203--
1204
1205DROP TABLE IF EXISTS `monica_import_jobs`;
1206/*!40101 SET @saved_cs_client = @@character_set_client */;
1207/*!40101 SET character_set_client = utf8 */;
1208CREATE TABLE `monica_import_jobs` (
1209 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1210 `account_id` int(11) NOT NULL,
1211 `user_id` int(11) NOT NULL,
1212 `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'vcard',
1213 `contacts_found` int(11) DEFAULT NULL,
1214 `contacts_skipped` int(11) DEFAULT NULL,
1215 `contacts_imported` int(11) DEFAULT NULL,
1216 `filename` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1217 `started_at` date DEFAULT NULL,
1218 `ended_at` date DEFAULT NULL,
1219 `failed` tinyint(1) NOT NULL DEFAULT '0',
1220 `failed_reason` mediumtext COLLATE utf8mb4_unicode_ci,
1221 `created_at` timestamp NULL DEFAULT NULL,
1222 `updated_at` timestamp NULL DEFAULT NULL,
1223 PRIMARY KEY (`id`)
1224) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1225/*!40101 SET character_set_client = @saved_cs_client */;
1226
1227--
1228-- Dumping data for table `monica_import_jobs`
1229--
1230
1231LOCK TABLES `monica_import_jobs` WRITE;
1232/*!40000 ALTER TABLE `monica_import_jobs` DISABLE KEYS */;
1233/*!40000 ALTER TABLE `monica_import_jobs` ENABLE KEYS */;
1234UNLOCK TABLES;
1235
1236--
1237-- Table structure for table `monica_instances`
1238--
1239
1240DROP TABLE IF EXISTS `monica_instances`;
1241/*!40101 SET @saved_cs_client = @@character_set_client */;
1242/*!40101 SET character_set_client = utf8 */;
1243CREATE TABLE `monica_instances` (
1244 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1245 `uuid` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1246 `current_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1247 `latest_version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1248 `latest_release_notes` mediumtext COLLATE utf8mb4_unicode_ci,
1249 `number_of_versions_since_current_version` int(11) DEFAULT NULL,
1250 `created_at` timestamp NULL DEFAULT NULL,
1251 `updated_at` timestamp NULL DEFAULT NULL,
1252 PRIMARY KEY (`id`)
1253) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1254/*!40101 SET character_set_client = @saved_cs_client */;
1255
1256--
1257-- Dumping data for table `monica_instances`
1258--
1259
1260LOCK TABLES `monica_instances` WRITE;
1261/*!40000 ALTER TABLE `monica_instances` DISABLE KEYS */;
1262INSERT INTO `monica_instances` VALUES (1,'5c6d748ce0e64','2.12.0','2.12.0',NULL,NULL,'2019-02-20 15:38:52','2019-02-20 15:38:52');
1263/*!40000 ALTER TABLE `monica_instances` ENABLE KEYS */;
1264UNLOCK TABLES;
1265
1266--
1267-- Table structure for table `monica_invitations`
1268--
1269
1270DROP TABLE IF EXISTS `monica_invitations`;
1271/*!40101 SET @saved_cs_client = @@character_set_client */;
1272/*!40101 SET character_set_client = utf8 */;
1273CREATE TABLE `monica_invitations` (
1274 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1275 `account_id` int(11) NOT NULL,
1276 `invited_by_user_id` int(11) NOT NULL,
1277 `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1278 `invitation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1279 `created_at` timestamp NULL DEFAULT NULL,
1280 `updated_at` timestamp NULL DEFAULT NULL,
1281 PRIMARY KEY (`id`)
1282) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1283/*!40101 SET character_set_client = @saved_cs_client */;
1284
1285--
1286-- Dumping data for table `monica_invitations`
1287--
1288
1289LOCK TABLES `monica_invitations` WRITE;
1290/*!40000 ALTER TABLE `monica_invitations` DISABLE KEYS */;
1291/*!40000 ALTER TABLE `monica_invitations` ENABLE KEYS */;
1292UNLOCK TABLES;
1293
1294--
1295-- Table structure for table `monica_jobs`
1296--
1297
1298DROP TABLE IF EXISTS `monica_jobs`;
1299/*!40101 SET @saved_cs_client = @@character_set_client */;
1300/*!40101 SET character_set_client = utf8 */;
1301CREATE TABLE `monica_jobs` (
1302 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
1303 `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1304 `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
1305 `attempts` tinyint(3) unsigned NOT NULL,
1306 `reserved_at` int(10) unsigned DEFAULT NULL,
1307 `available_at` int(10) unsigned NOT NULL,
1308 `created_at` int(10) unsigned NOT NULL,
1309 PRIMARY KEY (`id`),
1310 KEY `jobs_queue_reserved_at_index` (`queue`,`reserved_at`)
1311) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1312/*!40101 SET character_set_client = @saved_cs_client */;
1313
1314--
1315-- Dumping data for table `monica_jobs`
1316--
1317
1318LOCK TABLES `monica_jobs` WRITE;
1319/*!40000 ALTER TABLE `monica_jobs` DISABLE KEYS */;
1320/*!40000 ALTER TABLE `monica_jobs` ENABLE KEYS */;
1321UNLOCK TABLES;
1322
1323--
1324-- Table structure for table `monica_journal_entries`
1325--
1326
1327DROP TABLE IF EXISTS `monica_journal_entries`;
1328/*!40101 SET @saved_cs_client = @@character_set_client */;
1329/*!40101 SET character_set_client = utf8 */;
1330CREATE TABLE `monica_journal_entries` (
1331 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1332 `account_id` int(11) NOT NULL,
1333 `date` datetime NOT NULL,
1334 `journalable_id` int(11) NOT NULL,
1335 `journalable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1336 `created_at` timestamp NULL DEFAULT NULL,
1337 `updated_at` timestamp NULL DEFAULT NULL,
1338 PRIMARY KEY (`id`)
1339) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1340/*!40101 SET character_set_client = @saved_cs_client */;
1341
1342--
1343-- Dumping data for table `monica_journal_entries`
1344--
1345
1346LOCK TABLES `monica_journal_entries` WRITE;
1347/*!40000 ALTER TABLE `monica_journal_entries` DISABLE KEYS */;
1348/*!40000 ALTER TABLE `monica_journal_entries` ENABLE KEYS */;
1349UNLOCK TABLES;
1350
1351--
1352-- Table structure for table `monica_life_event_categories`
1353--
1354
1355DROP TABLE IF EXISTS `monica_life_event_categories`;
1356/*!40101 SET @saved_cs_client = @@character_set_client */;
1357/*!40101 SET character_set_client = utf8 */;
1358CREATE TABLE `monica_life_event_categories` (
1359 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1360 `account_id` int(10) unsigned NOT NULL,
1361 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1362 `default_life_event_category_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1363 `core_monica_data` tinyint(1) NOT NULL DEFAULT '0',
1364 `created_at` timestamp NULL DEFAULT NULL,
1365 `updated_at` timestamp NULL DEFAULT NULL,
1366 PRIMARY KEY (`id`),
1367 KEY `life_event_categories_account_id_foreign` (`account_id`),
1368 CONSTRAINT `life_event_categories_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
1369) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1370/*!40101 SET character_set_client = @saved_cs_client */;
1371
1372--
1373-- Dumping data for table `monica_life_event_categories`
1374--
1375
1376LOCK TABLES `monica_life_event_categories` WRITE;
1377/*!40000 ALTER TABLE `monica_life_event_categories` DISABLE KEYS */;
1378/*!40000 ALTER TABLE `monica_life_event_categories` ENABLE KEYS */;
1379UNLOCK TABLES;
1380
1381--
1382-- Table structure for table `monica_life_event_types`
1383--
1384
1385DROP TABLE IF EXISTS `monica_life_event_types`;
1386/*!40101 SET @saved_cs_client = @@character_set_client */;
1387/*!40101 SET character_set_client = utf8 */;
1388CREATE TABLE `monica_life_event_types` (
1389 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1390 `account_id` int(10) unsigned NOT NULL,
1391 `life_event_category_id` int(10) unsigned NOT NULL,
1392 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1393 `default_life_event_type_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1394 `core_monica_data` tinyint(1) NOT NULL DEFAULT '0',
1395 `specific_information_structure` text COLLATE utf8mb4_unicode_ci,
1396 `created_at` timestamp NULL DEFAULT NULL,
1397 `updated_at` timestamp NULL DEFAULT NULL,
1398 PRIMARY KEY (`id`),
1399 KEY `life_event_types_account_id_foreign` (`account_id`),
1400 KEY `life_event_types_life_event_category_id_foreign` (`life_event_category_id`),
1401 CONSTRAINT `life_event_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
1402 CONSTRAINT `life_event_types_life_event_category_id_foreign` FOREIGN KEY (`life_event_category_id`) REFERENCES `monica_life_event_categories` (`id`) ON DELETE CASCADE
1403) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1404/*!40101 SET character_set_client = @saved_cs_client */;
1405
1406--
1407-- Dumping data for table `monica_life_event_types`
1408--
1409
1410LOCK TABLES `monica_life_event_types` WRITE;
1411/*!40000 ALTER TABLE `monica_life_event_types` DISABLE KEYS */;
1412/*!40000 ALTER TABLE `monica_life_event_types` ENABLE KEYS */;
1413UNLOCK TABLES;
1414
1415--
1416-- Table structure for table `monica_life_events`
1417--
1418
1419DROP TABLE IF EXISTS `monica_life_events`;
1420/*!40101 SET @saved_cs_client = @@character_set_client */;
1421/*!40101 SET character_set_client = utf8 */;
1422CREATE TABLE `monica_life_events` (
1423 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1424 `account_id` int(10) unsigned NOT NULL,
1425 `contact_id` int(10) unsigned NOT NULL,
1426 `life_event_type_id` int(10) unsigned NOT NULL,
1427 `reminder_id` int(10) unsigned DEFAULT NULL,
1428 `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1429 `note` mediumtext COLLATE utf8mb4_unicode_ci,
1430 `happened_at` datetime NOT NULL,
1431 `happened_at_month_unknown` tinyint(1) NOT NULL DEFAULT '0',
1432 `happened_at_day_unknown` tinyint(1) NOT NULL DEFAULT '0',
1433 `specific_information` text COLLATE utf8mb4_unicode_ci,
1434 `created_at` timestamp NULL DEFAULT NULL,
1435 `updated_at` timestamp NULL DEFAULT NULL,
1436 PRIMARY KEY (`id`),
1437 KEY `life_events_account_id_foreign` (`account_id`),
1438 KEY `life_events_contact_id_foreign` (`contact_id`),
1439 KEY `life_events_life_event_type_id_foreign` (`life_event_type_id`),
1440 KEY `life_events_reminder_id_foreign` (`reminder_id`),
1441 CONSTRAINT `life_events_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
1442 CONSTRAINT `life_events_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
1443 CONSTRAINT `life_events_life_event_type_id_foreign` FOREIGN KEY (`life_event_type_id`) REFERENCES `monica_life_event_types` (`id`) ON DELETE CASCADE,
1444 CONSTRAINT `life_events_reminder_id_foreign` FOREIGN KEY (`reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL
1445) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1446/*!40101 SET character_set_client = @saved_cs_client */;
1447
1448--
1449-- Dumping data for table `monica_life_events`
1450--
1451
1452LOCK TABLES `monica_life_events` WRITE;
1453/*!40000 ALTER TABLE `monica_life_events` DISABLE KEYS */;
1454/*!40000 ALTER TABLE `monica_life_events` ENABLE KEYS */;
1455UNLOCK TABLES;
1456
1457--
1458-- Table structure for table `monica_messages`
1459--
1460
1461DROP TABLE IF EXISTS `monica_messages`;
1462/*!40101 SET @saved_cs_client = @@character_set_client */;
1463/*!40101 SET character_set_client = utf8 */;
1464CREATE TABLE `monica_messages` (
1465 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1466 `account_id` int(10) unsigned NOT NULL,
1467 `contact_id` int(10) unsigned NOT NULL,
1468 `conversation_id` int(10) unsigned NOT NULL,
1469 `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
1470 `written_at` datetime NOT NULL,
1471 `written_by_me` tinyint(1) NOT NULL,
1472 `created_at` timestamp NULL DEFAULT NULL,
1473 `updated_at` timestamp NULL DEFAULT NULL,
1474 PRIMARY KEY (`id`),
1475 KEY `messages_conversation_id_foreign` (`conversation_id`),
1476 KEY `messages_account_id_foreign` (`account_id`),
1477 KEY `messages_contact_id_foreign` (`contact_id`),
1478 CONSTRAINT `messages_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
1479 CONSTRAINT `messages_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
1480 CONSTRAINT `messages_conversation_id_foreign` FOREIGN KEY (`conversation_id`) REFERENCES `monica_conversations` (`id`) ON DELETE CASCADE
1481) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1482/*!40101 SET character_set_client = @saved_cs_client */;
1483
1484--
1485-- Dumping data for table `monica_messages`
1486--
1487
1488LOCK TABLES `monica_messages` WRITE;
1489/*!40000 ALTER TABLE `monica_messages` DISABLE KEYS */;
1490/*!40000 ALTER TABLE `monica_messages` ENABLE KEYS */;
1491UNLOCK TABLES;
1492
1493--
1494-- Table structure for table `monica_metadata_love_relationships`
1495--
1496
1497DROP TABLE IF EXISTS `monica_metadata_love_relationships`;
1498/*!40101 SET @saved_cs_client = @@character_set_client */;
1499/*!40101 SET character_set_client = utf8 */;
1500CREATE TABLE `monica_metadata_love_relationships` (
1501 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1502 `account_id` int(10) unsigned NOT NULL,
1503 `relationship_id` int(10) unsigned NOT NULL,
1504 `is_active` tinyint(1) NOT NULL,
1505 `notes` mediumtext COLLATE utf8mb4_unicode_ci,
1506 `meet_date` datetime DEFAULT NULL,
1507 `official_date` datetime DEFAULT NULL,
1508 `breakup_date` datetime DEFAULT NULL,
1509 `breakup_reason` mediumtext COLLATE utf8mb4_unicode_ci,
1510 `created_at` timestamp NULL DEFAULT NULL,
1511 `updated_at` timestamp NULL DEFAULT NULL,
1512 PRIMARY KEY (`id`),
1513 KEY `metadata_love_relationships_account_id_foreign` (`account_id`),
1514 KEY `metadata_love_relationships_relationship_id_foreign` (`relationship_id`),
1515 CONSTRAINT `metadata_love_relationships_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
1516 CONSTRAINT `metadata_love_relationships_relationship_id_foreign` FOREIGN KEY (`relationship_id`) REFERENCES `monica_relationships` (`id`) ON DELETE CASCADE
1517) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1518/*!40101 SET character_set_client = @saved_cs_client */;
1519
1520--
1521-- Dumping data for table `monica_metadata_love_relationships`
1522--
1523
1524LOCK TABLES `monica_metadata_love_relationships` WRITE;
1525/*!40000 ALTER TABLE `monica_metadata_love_relationships` DISABLE KEYS */;
1526/*!40000 ALTER TABLE `monica_metadata_love_relationships` ENABLE KEYS */;
1527UNLOCK TABLES;
1528
1529--
1530-- Table structure for table `monica_migrations`
1531--
1532
1533DROP TABLE IF EXISTS `monica_migrations`;
1534/*!40101 SET @saved_cs_client = @@character_set_client */;
1535/*!40101 SET character_set_client = utf8 */;
1536CREATE TABLE `monica_migrations` (
1537 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1538 `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1539 `batch` int(11) NOT NULL,
1540 PRIMARY KEY (`id`)
1541) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1542/*!40101 SET character_set_client = @saved_cs_client */;
1543
1544--
1545-- Dumping data for table `monica_migrations`
1546--
1547
1548LOCK TABLES `monica_migrations` WRITE;
1549/*!40000 ALTER TABLE `monica_migrations` DISABLE KEYS */;
1550INSERT INTO `monica_migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_resets_table',1),(3,'2016_06_01_000001_create_oauth_auth_codes_table',1),(4,'2016_06_01_000002_create_oauth_access_tokens_table',1),(5,'2016_06_01_000003_create_oauth_refresh_tokens_table',1),(6,'2016_06_01_000004_create_oauth_clients_table',1),(7,'2016_06_01_000005_create_oauth_personal_access_clients_table',1),(8,'2016_06_07_234741_create_account_table',1),(9,'2016_06_08_003006_add_account_info_table',1),(10,'2016_06_08_005413_create_contacts_table',1),(11,'2016_06_25_224219_create_reminder_type_table',1),(12,'2016_06_28_191025_create_tasks_table',1),(13,'2016_06_30_185050_create_notes_table',1),(14,'2016_07_25_133835_add_width_field',1),(15,'2016_08_28_122938_create_kids_table',1),(16,'2016_08_28_215159_create_relations_table',1),(17,'2016_09_03_202027_add_reminder_id_to_contacts',1),(18,'2016_09_05_134937_add_last_talked_to_field',1),(19,'2016_09_05_135927_add_people_id_to_contacts',1),(20,'2016_09_05_145111_add_name_info_to_peoples',1),(21,'2016_09_06_213550_create_activity_type_table',1),(22,'2016_09_10_164406_create_jobs_table',1),(23,'2016_09_10_170122_create_notifications_table',1),(24,'2016_09_12_014120_create_failed_jobs_table',1),(25,'2016_09_30_014720_add_kid_to_reminder',1),(26,'2016_10_15_024156_add_deleted_at_to_users',1),(27,'2016_10_19_155139_create_cache_table',1),(28,'2016_10_19_155800_create_sessions_table',1),(29,'2016_10_21_022941_add_statistics_table',1),(30,'2016_10_24_013543_add_journal_setting_to_users',1),(31,'2016_10_24_014257_create_journal_tables',1),(32,'2016_10_28_002518_add_metric_to_settings',1),(33,'2016_11_01_014353_create_activities_table',1),(34,'2016_11_01_015957_add_icon_column',1),(35,'2016_11_03_150307_add_activity_location_to_activities',1),(36,'2016_11_09_013049_add_events_table',1),(37,'2016_12_08_011555_remove_type_from_notes',1),(38,'2016_12_13_133945_add_gifts_table',1),(39,'2016_12_28_150831_change_title_column',1),(40,'2017_01_14_200815_add_facebook_columns_to_users_table',1),(41,'2017_01_15_045025_add_colors_to_users',1),(42,'2017_01_22_142645_add_fields_to_contacts',1),(43,'2017_01_23_043831_change_people_to_contact_for_kids',1),(44,'2017_01_26_013524_change_people_to_significantother',1),(45,'2017_01_26_022852_change_notes_to_contact',1),(46,'2017_01_26_034553_add_notes_count_to_contact',1),(47,'2017_01_27_024356_change_people_in_events',1),(48,'2017_01_28_180156_remove_deleted_at_from_significant_others',1),(49,'2017_01_28_184901_remove_deleted_at_from_kids',1),(50,'2017_01_28_193913_remove_deleted_at_from_notes',1),(51,'2017_01_28_222114_remove_viewed_at_from_contacts',1),(52,'2017_01_29_175146_remove_delete_at_from_activities',1),(53,'2017_01_29_175629_add_number_activities_to_contacts',1),(54,'2017_01_31_025849_add_activity_statistics_table',1),(55,'2017_02_02_232450_add_confirmation',1),(56,'2017_02_04_225618_change_reminders_table',1),(57,'2017_02_05_035925_add_gifts_metrics_to_contacts',1),(58,'2017_02_05_041740_change_gifts_table',1),(59,'2017_02_05_042122_change_people_to_contact_for_gifts',1),(60,'2017_02_07_041607_change_tasks_table',1),(61,'2017_02_07_051355_add_number_tasks_to_contact',1),(62,'2017_02_08_002251_change_number_tasks_contact',1),(63,'2017_02_08_025358_add_sort_preferences_to_users',1),(64,'2017_02_10_195613_remove_notifications_table',1),(65,'2017_02_10_214714_remove_people_table',1),(66,'2017_02_10_215405_remove_entities_table',1),(67,'2017_02_10_215705_remove_deleted_at_from_contact',1),(68,'2017_02_10_224355_calculate_statistics',1),(69,'2017_02_11_154900_add_avatars_to_contacts',1),(70,'2017_02_12_134220_create_entries_table',1),(71,'2017_05_03_155254_move_significant_other_data',1),(72,'2017_05_04_164723_remove_contact_encryption',1),(73,'2017_05_04_185921_add_title_to_activities',1),(74,'2017_05_04_193252_alter_activity_nullable',1),(75,'2017_05_08_164514_remove_encryption_tasks',1),(76,'2017_05_30_002239_remove_predefined_reminders',1),(77,'2017_05_30_023116_create_money_table',1),(78,'2017_06_07_173437_add_multiple_genders_choices',1),(79,'2017_06_10_152945_add_social_networks_to_contacts',1),(80,'2017_06_10_155349_create_currencies_data',1),(81,'2017_06_11_025227_remove_encryption_journal',1),(82,'2017_06_11_110735_change_unique_constraint_for_contacts',1),(83,'2017_06_13_035059_remove_gifts_encryption',1),(84,'2017_06_13_195740_add_company_to_contacts',1),(85,'2017_06_14_131803_remove_bern_timezone',1),(86,'2017_06_14_132911_add_zar_currency_to_currencies_table',1),(87,'2017_06_16_215256_add_about_who_to_reminders',1),(88,'2017_06_17_010900_fix_contacts_table',1),(89,'2017_06_17_153814_refactor_user_table',1),(90,'2017_06_19_105842_add_stripe_fields_to_users',1),(91,'2017_06_20_121345_add_invitations_statistics',1),(92,'2017_06_22_210813_add_name_order_to_users',1),(93,'2017_06_27_134704_create_import_table',1),(94,'2017_06_29_211725_add_import_job_to_statistics',1),(95,'2017_06_29_230523_add_gravatar_url_to_users',1),(96,'2017_07_02_155736_create_tags_table',1),(97,'2017_07_04_132743_add_tags_to_statistics',1),(98,'2017_07_09_164312_update_bad_translation_key',1),(99,'2017_07_12_014244_create_calls_table',1),(100,'2017_07_17_005012_drop_reminders_count_from_contacts',1),(101,'2017_07_18_215312_add_danish_kroner_to_currencies_table',1),(102,'2017_07_18_215758_add_indian_rupee_to_currencies_table',1),(103,'2017_07_19_094503_add_brazilian_real_to_currencies',1),(104,'2017_07_22_153209_create_instance_table',1),(105,'2017_07_26_220021_change_contacts_table',1),(106,'2017_08_02_152838_change_string_to_boolean_for_reminders',1),(107,'2017_08_06_085629_change_events_data',1),(108,'2017_08_06_153253_move_kids_to_contacts',1),(109,'2017_08_16_041431_add_contact_avatar_location',1),(110,'2017_08_21_224835_remove_paid_limitations_for_current_users',1),(111,'2017_09_10_125918_remove_unusued_counters',1),(112,'2017_09_13_095923_add_tracking_table',1),(113,'2017_09_13_191714_add_partial_notion',1),(114,'2017_10_14_083556_change_gift_column_structure',1),(115,'2017_10_17_170803_change_gift_structure',1),(116,'2017_10_19_134816_create_activity_contact_table',1),(117,'2017_10_19_135215_move_activities_to_pivot_table',1),(118,'2017_10_25_102923_remove_contact_id_activities_table',1),(119,'2017_11_01_122541_add_met_through_to_contacts',1),(120,'2017_11_02_202601_add_is_dead_to_contacts',1),(121,'2017_11_10_174654_create_contact_fields_table',1),(122,'2017_11_10_181043_migrate_contacts_information',1),(123,'2017_11_10_202620_move_addresses_from_contact_to_addresses',1),(124,'2017_11_10_204035_delete_contact_fields_from_contacts',1),(125,'2017_11_20_115635_change-amount-to-double-on-debts',1),(126,'2017_11_27_083043_add_more_statistics',1),(127,'2017_11_27_134403_add_new_avatar_to_contacts',1),(128,'2017_11_27_202857_change_tasks_table_structure',1),(129,'2017_12_01_113748_update_notes',1),(130,'2017_12_04_164831_create_ages_table',1),(131,'2017_12_04_165421_move_ages_data',1),(132,'2017_12_10_181535_remove_important_dates_table',1),(133,'2017_12_10_205328_add_account_id_to_activities',1),(134,'2017_12_10_214545_add_last_consulted_at_to_contacts',1),(135,'2017_12_13_115857_create_day_table',1),(136,'2017_12_21_163616_update_journal_entries_with_existing_activities',1),(137,'2017_12_21_170327_add_google2fa_secret_to_users',1),(138,'2017_12_24_115641_create_pets_table',1),(139,'2017_12_31_114224_add_dashboard_tab_to_users',1),(140,'2018_01_15_105858_create_additional_reminders_table',1),(141,'2018_01_16_203358_add_gift_received',1),(142,'2018_01_16_212320_rename_gift_columns',1),(143,'2018_01_17_230820_add_gift_tab_view_to_users',1),(144,'2018_01_27_014146_add_custom_gender',1),(145,'2018_02_25_202752_change_locale_in_db',1),(146,'2018_02_28_223747_update_notification_table',1),(147,'2018_03_03_204440_create_relationship_type_table',1),(148,'2018_03_18_085815_populate_default_relationship_type_tables',1),(149,'2018_03_18_090209_populate_relationship_type_tables_with_default_values',1),(150,'2018_03_18_090345_migrate_current_relationship_table_to_new_relationship_structure',1),(151,'2018_03_24_083258_migrate_offsprings',1),(152,'2018_04_04_220850_create_default_modules_table',1),(153,'2018_04_04_222608_create_account_modules_table',1),(154,'2018_04_10_205655_fix_production_error',1),(155,'2018_04_10_222515_migrate-modules',1),(156,'2018_04_13_131008_fix-contacts-data',1),(157,'2018_04_13_205231_create_changes_table',1),(158,'2018_04_14_081052_fix_wrong_gender',1),(159,'2018_04_19_190239_stay_in_touch',1),(160,'2018_05_06_061227_external_countries',1),(161,'2018_05_06_194710_delete_reminder_sent_table',1),(162,'2018_05_07_070458_create_terms_table',1),(163,'2018_05_13_110706_add_ex_wife_husband_relationship',1),(164,'2018_05_16_143631_add_nickname_to_contacts',1),(165,'2018_05_16_214222_add_timestamps_to_currencies',1),(166,'2018_05_20_121028_accept_terms',1),(167,'2018_05_20_225034_change_name_order_user-_preferencies',1),(168,'2018_05_24_160546_fix-inconsistant-reminder-time',1),(169,'2018_06_10_191450_add_love_metadata_relationshisp',1),(170,'2018_06_10_221746_migrate_entries_objects',1),(171,'2018_06_11_184017_change_default_user_table',1),(172,'2018_06_13_000100_create_u2f_key_table',1),(173,'2018_06_14_212502_change_default_name_order_user_table',1),(174,'2018_07_03_204220_create_default_activity_type_groups_table',1),(175,'2018_07_08_104306_update-timestamps-timezone',1),(176,'2018_07_26_104306_create-conversations',1),(177,'2018_08_06_145046_add_starred_to_contacts',1),(178,'2018_08_09_18000_fix-empty-reminder-time',1),(179,'2018_08_18_180426_add_legacy_free_plan',1),(180,'2018_08_29_124804_add_conversations_to_statistics',1),(181,'2018_08_29_222051_add_conversations_to_modules',1),(182,'2018_08_31_020908_create_life_events_table',1),(183,'2018_09_02_150531_contact_archiving',1),(184,'2018_09_05_025008_add_default_profile_view',1),(185,'2018_09_05_213507_mark_modules_migrated',1),(186,'2018_09_13_135926_add_description_field_to_contacts',1),(187,'2018_09_18_142844_remove_events',1),(188,'2018_09_23_024528_add_documents_table',1),(189,'2018_09_29_114125_add_reminder_to_life_events',1),(190,'2018_10_01_211757_add_number_of_views',1),(191,'2018_10_04_181116_life_event_vehicle',1),(192,'2018_10_07_120133_fix_json_column',1),(193,'2018_10_16_000703_add_documents_to_module_table',1),(194,'2018_10_19_081816_life_event_tattoo',1),(195,'2018_10_27_230346_fix_non_english_tab_slugs',1),(196,'2018_10_28_165814_email_verified',1),(197,'2018_11_11_145035_remove_changelogs_table',1),(198,'2018_11_15_172333_make_contact_id_nullable_in_tasks',1),(199,'2018_11_18_021908_create_images_table',1),(200,'2018_11_21_212932_add_contacts_uuid',1),(201,'2018_11_25_020818_add_contact_photo_table',1),(202,'2018_11_30_154729_recovery_codes',1),(203,'2018_12_08_233140_add_who_called_to_calls',1),(204,'2018_12_09_023232_add_emotions_table',1),(205,'2018_12_09_145956_create_emotion_call_table',1),(206,'2018_12_16_195440_add_gps_coordinates_to_addressess',1),(207,'2018_12_19_002819_create_places_table',1),(208,'2018_12_19_003444_move_addresses_data',1),(209,'2018_12_21_235418_add_weather_table',1),(210,'2018_12_22_021123_add_weather_preferences_to_users',1),(211,'2018_12_22_200413_add_reminder_initial_date_to_reminders',1),(212,'2018_12_24_164256_add_companies_table',1),(213,'2018_12_24_220019_add_occupations_table',1),(214,'2018_12_25_001736_add_linkedin_to_default_contact_field_type',1),(215,'2018_12_25_012011_move_linkedin_data_to_contact_field_type',1),(216,'2018_12_29_091017_default_temperature_scale',1),(217,'2018_12_29_135516_sync_token',1),(218,'2019_01_05_152329_add_reminder_ids_to_contacts',1),(219,'2019_01_05_152405_migrate_previous_remiders',1),(220,'2019_01_05_152456_drop_special_date_id_from_reminders',1),(221,'2019_01_05_152526_schedule_new_reminders',1),(222,'2019_01_05_202557_add_foreign_keys_to_reminder',1),(223,'2019_01_05_202748_add_foreign_key_to_reminder_rule',1),(224,'2019_01_05_202938_add_foreign_key_to_contacts',1),(225,'2019_01_05_203201_add_foreign_key_for_reminder_in_life-events_table',1),(226,'2019_01_06_135133_update_u2f_key_table',1),(227,'2019_01_06_150143_add_inactive_flag_to_reminders',1),(228,'2019_01_06_190036_u2f_key_name',1),(229,'2019_01_11_142944_add_foreign_keys_to_activities',1),(230,'2019_01_17_093812_add_admin_user',1),(231,'2019_01_18_142032_add_dav_uuid',1),(232,'2019_01_24_221539_change_activity_model_location',1),(233,'2019_02_08_234959_remove_users_without_account',1);
1551/*!40000 ALTER TABLE `monica_migrations` ENABLE KEYS */;
1552UNLOCK TABLES;
1553
1554--
1555-- Table structure for table `monica_modules`
1556--
1557
1558DROP TABLE IF EXISTS `monica_modules`;
1559/*!40101 SET @saved_cs_client = @@character_set_client */;
1560/*!40101 SET character_set_client = utf8 */;
1561CREATE TABLE `monica_modules` (
1562 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1563 `account_id` int(11) NOT NULL,
1564 `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1565 `translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1566 `active` tinyint(1) NOT NULL DEFAULT '1',
1567 `delible` tinyint(1) NOT NULL DEFAULT '0',
1568 `created_at` timestamp NULL DEFAULT NULL,
1569 `updated_at` timestamp NULL DEFAULT NULL,
1570 PRIMARY KEY (`id`)
1571) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1572/*!40101 SET character_set_client = @saved_cs_client */;
1573
1574--
1575-- Dumping data for table `monica_modules`
1576--
1577
1578LOCK TABLES `monica_modules` WRITE;
1579/*!40000 ALTER TABLE `monica_modules` DISABLE KEYS */;
1580/*!40000 ALTER TABLE `monica_modules` ENABLE KEYS */;
1581UNLOCK TABLES;
1582
1583--
1584-- Table structure for table `monica_notes`
1585--
1586
1587DROP TABLE IF EXISTS `monica_notes`;
1588/*!40101 SET @saved_cs_client = @@character_set_client */;
1589/*!40101 SET character_set_client = utf8 */;
1590CREATE TABLE `monica_notes` (
1591 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1592 `account_id` int(11) NOT NULL,
1593 `contact_id` int(11) NOT NULL,
1594 `body` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
1595 `is_favorited` tinyint(1) NOT NULL DEFAULT '0',
1596 `favorited_at` date DEFAULT NULL,
1597 `created_at` timestamp NULL DEFAULT NULL,
1598 `updated_at` timestamp NULL DEFAULT NULL,
1599 PRIMARY KEY (`id`)
1600) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1601/*!40101 SET character_set_client = @saved_cs_client */;
1602
1603--
1604-- Dumping data for table `monica_notes`
1605--
1606
1607LOCK TABLES `monica_notes` WRITE;
1608/*!40000 ALTER TABLE `monica_notes` DISABLE KEYS */;
1609/*!40000 ALTER TABLE `monica_notes` ENABLE KEYS */;
1610UNLOCK TABLES;
1611
1612--
1613-- Table structure for table `monica_notifications`
1614--
1615
1616DROP TABLE IF EXISTS `monica_notifications`;
1617/*!40101 SET @saved_cs_client = @@character_set_client */;
1618/*!40101 SET character_set_client = utf8 */;
1619CREATE TABLE `monica_notifications` (
1620 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1621 `account_id` int(11) NOT NULL,
1622 `contact_id` int(11) NOT NULL,
1623 `reminder_id` int(11) DEFAULT NULL,
1624 `delete_after_number_of_emails_sent` int(11) NOT NULL DEFAULT '0',
1625 `number_of_emails_sent` int(11) NOT NULL DEFAULT '0',
1626 `trigger_date` datetime NOT NULL,
1627 `scheduled_number_days_before` int(11) DEFAULT NULL,
1628 `created_at` timestamp NULL DEFAULT NULL,
1629 `updated_at` timestamp NULL DEFAULT NULL,
1630 PRIMARY KEY (`id`)
1631) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1632/*!40101 SET character_set_client = @saved_cs_client */;
1633
1634--
1635-- Dumping data for table `monica_notifications`
1636--
1637
1638LOCK TABLES `monica_notifications` WRITE;
1639/*!40000 ALTER TABLE `monica_notifications` DISABLE KEYS */;
1640/*!40000 ALTER TABLE `monica_notifications` ENABLE KEYS */;
1641UNLOCK TABLES;
1642
1643--
1644-- Table structure for table `monica_oauth_access_tokens`
1645--
1646
1647DROP TABLE IF EXISTS `monica_oauth_access_tokens`;
1648/*!40101 SET @saved_cs_client = @@character_set_client */;
1649/*!40101 SET character_set_client = utf8 */;
1650CREATE TABLE `monica_oauth_access_tokens` (
1651 `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
1652 `user_id` int(11) DEFAULT NULL,
1653 `client_id` int(10) unsigned NOT NULL,
1654 `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1655 `scopes` text COLLATE utf8mb4_unicode_ci,
1656 `revoked` tinyint(1) NOT NULL,
1657 `created_at` timestamp NULL DEFAULT NULL,
1658 `updated_at` timestamp NULL DEFAULT NULL,
1659 `expires_at` datetime DEFAULT NULL,
1660 PRIMARY KEY (`id`),
1661 KEY `oauth_access_tokens_user_id_index` (`user_id`)
1662) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1663/*!40101 SET character_set_client = @saved_cs_client */;
1664
1665--
1666-- Dumping data for table `monica_oauth_access_tokens`
1667--
1668
1669LOCK TABLES `monica_oauth_access_tokens` WRITE;
1670/*!40000 ALTER TABLE `monica_oauth_access_tokens` DISABLE KEYS */;
1671/*!40000 ALTER TABLE `monica_oauth_access_tokens` ENABLE KEYS */;
1672UNLOCK TABLES;
1673
1674--
1675-- Table structure for table `monica_oauth_auth_codes`
1676--
1677
1678DROP TABLE IF EXISTS `monica_oauth_auth_codes`;
1679/*!40101 SET @saved_cs_client = @@character_set_client */;
1680/*!40101 SET character_set_client = utf8 */;
1681CREATE TABLE `monica_oauth_auth_codes` (
1682 `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
1683 `user_id` int(11) NOT NULL,
1684 `client_id` int(10) unsigned NOT NULL,
1685 `scopes` text COLLATE utf8mb4_unicode_ci,
1686 `revoked` tinyint(1) NOT NULL,
1687 `expires_at` datetime DEFAULT NULL,
1688 PRIMARY KEY (`id`)
1689) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1690/*!40101 SET character_set_client = @saved_cs_client */;
1691
1692--
1693-- Dumping data for table `monica_oauth_auth_codes`
1694--
1695
1696LOCK TABLES `monica_oauth_auth_codes` WRITE;
1697/*!40000 ALTER TABLE `monica_oauth_auth_codes` DISABLE KEYS */;
1698/*!40000 ALTER TABLE `monica_oauth_auth_codes` ENABLE KEYS */;
1699UNLOCK TABLES;
1700
1701--
1702-- Table structure for table `monica_oauth_clients`
1703--
1704
1705DROP TABLE IF EXISTS `monica_oauth_clients`;
1706/*!40101 SET @saved_cs_client = @@character_set_client */;
1707/*!40101 SET character_set_client = utf8 */;
1708CREATE TABLE `monica_oauth_clients` (
1709 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1710 `user_id` int(11) DEFAULT NULL,
1711 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1712 `secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
1713 `redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,
1714 `personal_access_client` tinyint(1) NOT NULL,
1715 `password_client` tinyint(1) NOT NULL,
1716 `revoked` tinyint(1) NOT NULL,
1717 `created_at` timestamp NULL DEFAULT NULL,
1718 `updated_at` timestamp NULL DEFAULT NULL,
1719 PRIMARY KEY (`id`),
1720 KEY `oauth_clients_user_id_index` (`user_id`)
1721) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1722/*!40101 SET character_set_client = @saved_cs_client */;
1723
1724--
1725-- Dumping data for table `monica_oauth_clients`
1726--
1727
1728LOCK TABLES `monica_oauth_clients` WRITE;
1729/*!40000 ALTER TABLE `monica_oauth_clients` DISABLE KEYS */;
1730/*!40000 ALTER TABLE `monica_oauth_clients` ENABLE KEYS */;
1731UNLOCK TABLES;
1732
1733--
1734-- Table structure for table `monica_oauth_personal_access_clients`
1735--
1736
1737DROP TABLE IF EXISTS `monica_oauth_personal_access_clients`;
1738/*!40101 SET @saved_cs_client = @@character_set_client */;
1739/*!40101 SET character_set_client = utf8 */;
1740CREATE TABLE `monica_oauth_personal_access_clients` (
1741 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1742 `client_id` int(10) unsigned NOT NULL,
1743 `created_at` timestamp NULL DEFAULT NULL,
1744 `updated_at` timestamp NULL DEFAULT NULL,
1745 PRIMARY KEY (`id`),
1746 KEY `oauth_personal_access_clients_client_id_index` (`client_id`)
1747) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1748/*!40101 SET character_set_client = @saved_cs_client */;
1749
1750--
1751-- Dumping data for table `monica_oauth_personal_access_clients`
1752--
1753
1754LOCK TABLES `monica_oauth_personal_access_clients` WRITE;
1755/*!40000 ALTER TABLE `monica_oauth_personal_access_clients` DISABLE KEYS */;
1756/*!40000 ALTER TABLE `monica_oauth_personal_access_clients` ENABLE KEYS */;
1757UNLOCK TABLES;
1758
1759--
1760-- Table structure for table `monica_oauth_refresh_tokens`
1761--
1762
1763DROP TABLE IF EXISTS `monica_oauth_refresh_tokens`;
1764/*!40101 SET @saved_cs_client = @@character_set_client */;
1765/*!40101 SET character_set_client = utf8 */;
1766CREATE TABLE `monica_oauth_refresh_tokens` (
1767 `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
1768 `access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
1769 `revoked` tinyint(1) NOT NULL,
1770 `expires_at` datetime DEFAULT NULL,
1771 PRIMARY KEY (`id`),
1772 KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`)
1773) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1774/*!40101 SET character_set_client = @saved_cs_client */;
1775
1776--
1777-- Dumping data for table `monica_oauth_refresh_tokens`
1778--
1779
1780LOCK TABLES `monica_oauth_refresh_tokens` WRITE;
1781/*!40000 ALTER TABLE `monica_oauth_refresh_tokens` DISABLE KEYS */;
1782/*!40000 ALTER TABLE `monica_oauth_refresh_tokens` ENABLE KEYS */;
1783UNLOCK TABLES;
1784
1785--
1786-- Table structure for table `monica_occupations`
1787--
1788
1789DROP TABLE IF EXISTS `monica_occupations`;
1790/*!40101 SET @saved_cs_client = @@character_set_client */;
1791/*!40101 SET character_set_client = utf8 */;
1792CREATE TABLE `monica_occupations` (
1793 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1794 `account_id` int(10) unsigned NOT NULL,
1795 `contact_id` int(10) unsigned NOT NULL,
1796 `company_id` int(10) unsigned NOT NULL,
1797 `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1798 `description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1799 `salary` int(11) DEFAULT NULL,
1800 `salary_unit` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1801 `currently_works_here` tinyint(1) DEFAULT '0',
1802 `start_date` date DEFAULT NULL,
1803 `end_date` date DEFAULT NULL,
1804 `created_at` timestamp NULL DEFAULT NULL,
1805 `updated_at` timestamp NULL DEFAULT NULL,
1806 PRIMARY KEY (`id`),
1807 KEY `occupations_account_id_foreign` (`account_id`),
1808 KEY `occupations_contact_id_foreign` (`contact_id`),
1809 KEY `occupations_company_id_foreign` (`company_id`),
1810 CONSTRAINT `occupations_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
1811 CONSTRAINT `occupations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `monica_companies` (`id`) ON DELETE CASCADE,
1812 CONSTRAINT `occupations_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
1813) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1814/*!40101 SET character_set_client = @saved_cs_client */;
1815
1816--
1817-- Dumping data for table `monica_occupations`
1818--
1819
1820LOCK TABLES `monica_occupations` WRITE;
1821/*!40000 ALTER TABLE `monica_occupations` DISABLE KEYS */;
1822/*!40000 ALTER TABLE `monica_occupations` ENABLE KEYS */;
1823UNLOCK TABLES;
1824
1825--
1826-- Table structure for table `monica_password_resets`
1827--
1828
1829DROP TABLE IF EXISTS `monica_password_resets`;
1830/*!40101 SET @saved_cs_client = @@character_set_client */;
1831/*!40101 SET character_set_client = utf8 */;
1832CREATE TABLE `monica_password_resets` (
1833 `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1834 `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1835 `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
1836 KEY `password_resets_email_index` (`email`),
1837 KEY `password_resets_token_index` (`token`)
1838) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1839/*!40101 SET character_set_client = @saved_cs_client */;
1840
1841--
1842-- Dumping data for table `monica_password_resets`
1843--
1844
1845LOCK TABLES `monica_password_resets` WRITE;
1846/*!40000 ALTER TABLE `monica_password_resets` DISABLE KEYS */;
1847/*!40000 ALTER TABLE `monica_password_resets` ENABLE KEYS */;
1848UNLOCK TABLES;
1849
1850--
1851-- Table structure for table `monica_pet_categories`
1852--
1853
1854DROP TABLE IF EXISTS `monica_pet_categories`;
1855/*!40101 SET @saved_cs_client = @@character_set_client */;
1856/*!40101 SET character_set_client = utf8 */;
1857CREATE TABLE `monica_pet_categories` (
1858 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1859 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1860 `is_common` tinyint(1) NOT NULL,
1861 `created_at` timestamp NULL DEFAULT NULL,
1862 `updated_at` timestamp NULL DEFAULT NULL,
1863 PRIMARY KEY (`id`)
1864) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1865/*!40101 SET character_set_client = @saved_cs_client */;
1866
1867--
1868-- Dumping data for table `monica_pet_categories`
1869--
1870
1871LOCK TABLES `monica_pet_categories` WRITE;
1872/*!40000 ALTER TABLE `monica_pet_categories` DISABLE KEYS */;
1873INSERT INTO `monica_pet_categories` VALUES (1,'reptile',0,NULL,NULL),(2,'bird',0,NULL,NULL),(3,'cat',1,NULL,NULL),(4,'dog',1,NULL,NULL),(5,'fish',1,NULL,NULL),(6,'hamster',0,NULL,NULL),(7,'horse',0,NULL,NULL),(8,'rabbit',0,NULL,NULL),(9,'rat',0,NULL,NULL),(10,'small_animal',0,NULL,NULL),(11,'other',0,NULL,NULL);
1874/*!40000 ALTER TABLE `monica_pet_categories` ENABLE KEYS */;
1875UNLOCK TABLES;
1876
1877--
1878-- Table structure for table `monica_pets`
1879--
1880
1881DROP TABLE IF EXISTS `monica_pets`;
1882/*!40101 SET @saved_cs_client = @@character_set_client */;
1883/*!40101 SET character_set_client = utf8 */;
1884CREATE TABLE `monica_pets` (
1885 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1886 `account_id` int(11) NOT NULL,
1887 `contact_id` int(11) NOT NULL,
1888 `pet_category_id` int(11) NOT NULL,
1889 `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1890 `created_at` timestamp NULL DEFAULT NULL,
1891 `updated_at` timestamp NULL DEFAULT NULL,
1892 PRIMARY KEY (`id`)
1893) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1894/*!40101 SET character_set_client = @saved_cs_client */;
1895
1896--
1897-- Dumping data for table `monica_pets`
1898--
1899
1900LOCK TABLES `monica_pets` WRITE;
1901/*!40000 ALTER TABLE `monica_pets` DISABLE KEYS */;
1902/*!40000 ALTER TABLE `monica_pets` ENABLE KEYS */;
1903UNLOCK TABLES;
1904
1905--
1906-- Table structure for table `monica_photos`
1907--
1908
1909DROP TABLE IF EXISTS `monica_photos`;
1910/*!40101 SET @saved_cs_client = @@character_set_client */;
1911/*!40101 SET character_set_client = utf8 */;
1912CREATE TABLE `monica_photos` (
1913 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1914 `account_id` int(10) unsigned NOT NULL,
1915 `original_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1916 `new_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1917 `filesize` int(11) DEFAULT NULL,
1918 `mime_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1919 `created_at` timestamp NULL DEFAULT NULL,
1920 `updated_at` timestamp NULL DEFAULT NULL,
1921 PRIMARY KEY (`id`),
1922 KEY `photos_account_id_foreign` (`account_id`),
1923 CONSTRAINT `photos_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
1924) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1925/*!40101 SET character_set_client = @saved_cs_client */;
1926
1927--
1928-- Dumping data for table `monica_photos`
1929--
1930
1931LOCK TABLES `monica_photos` WRITE;
1932/*!40000 ALTER TABLE `monica_photos` DISABLE KEYS */;
1933/*!40000 ALTER TABLE `monica_photos` ENABLE KEYS */;
1934UNLOCK TABLES;
1935
1936--
1937-- Table structure for table `monica_places`
1938--
1939
1940DROP TABLE IF EXISTS `monica_places`;
1941/*!40101 SET @saved_cs_client = @@character_set_client */;
1942/*!40101 SET character_set_client = utf8 */;
1943CREATE TABLE `monica_places` (
1944 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1945 `account_id` int(10) unsigned NOT NULL,
1946 `street` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1947 `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1948 `province` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1949 `postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1950 `country` char(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
1951 `latitude` double DEFAULT NULL,
1952 `longitude` double DEFAULT NULL,
1953 `created_at` timestamp NULL DEFAULT NULL,
1954 `updated_at` timestamp NULL DEFAULT NULL,
1955 PRIMARY KEY (`id`),
1956 KEY `places_account_id_foreign` (`account_id`),
1957 CONSTRAINT `places_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
1958) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1959/*!40101 SET character_set_client = @saved_cs_client */;
1960
1961--
1962-- Dumping data for table `monica_places`
1963--
1964
1965LOCK TABLES `monica_places` WRITE;
1966/*!40000 ALTER TABLE `monica_places` DISABLE KEYS */;
1967/*!40000 ALTER TABLE `monica_places` ENABLE KEYS */;
1968UNLOCK TABLES;
1969
1970--
1971-- Table structure for table `monica_recovery_codes`
1972--
1973
1974DROP TABLE IF EXISTS `monica_recovery_codes`;
1975/*!40101 SET @saved_cs_client = @@character_set_client */;
1976/*!40101 SET character_set_client = utf8 */;
1977CREATE TABLE `monica_recovery_codes` (
1978 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1979 `account_id` int(10) unsigned NOT NULL,
1980 `user_id` int(10) unsigned NOT NULL,
1981 `recovery` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
1982 `used` tinyint(1) NOT NULL DEFAULT '0',
1983 `created_at` timestamp NULL DEFAULT NULL,
1984 `updated_at` timestamp NULL DEFAULT NULL,
1985 PRIMARY KEY (`id`),
1986 KEY `recovery_codes_account_id_foreign` (`account_id`),
1987 KEY `recovery_codes_user_id_foreign` (`user_id`),
1988 CONSTRAINT `recovery_codes_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
1989 CONSTRAINT `recovery_codes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
1990) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1991/*!40101 SET character_set_client = @saved_cs_client */;
1992
1993--
1994-- Dumping data for table `monica_recovery_codes`
1995--
1996
1997LOCK TABLES `monica_recovery_codes` WRITE;
1998/*!40000 ALTER TABLE `monica_recovery_codes` DISABLE KEYS */;
1999/*!40000 ALTER TABLE `monica_recovery_codes` ENABLE KEYS */;
2000UNLOCK TABLES;
2001
2002--
2003-- Table structure for table `monica_relationship_type_groups`
2004--
2005
2006DROP TABLE IF EXISTS `monica_relationship_type_groups`;
2007/*!40101 SET @saved_cs_client = @@character_set_client */;
2008/*!40101 SET character_set_client = utf8 */;
2009CREATE TABLE `monica_relationship_type_groups` (
2010 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2011 `account_id` int(11) NOT NULL,
2012 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2013 `delible` tinyint(1) NOT NULL DEFAULT '0',
2014 `created_at` timestamp NULL DEFAULT NULL,
2015 `updated_at` timestamp NULL DEFAULT NULL,
2016 PRIMARY KEY (`id`)
2017) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2018/*!40101 SET character_set_client = @saved_cs_client */;
2019
2020--
2021-- Dumping data for table `monica_relationship_type_groups`
2022--
2023
2024LOCK TABLES `monica_relationship_type_groups` WRITE;
2025/*!40000 ALTER TABLE `monica_relationship_type_groups` DISABLE KEYS */;
2026/*!40000 ALTER TABLE `monica_relationship_type_groups` ENABLE KEYS */;
2027UNLOCK TABLES;
2028
2029--
2030-- Table structure for table `monica_relationship_types`
2031--
2032
2033DROP TABLE IF EXISTS `monica_relationship_types`;
2034/*!40101 SET @saved_cs_client = @@character_set_client */;
2035/*!40101 SET character_set_client = utf8 */;
2036CREATE TABLE `monica_relationship_types` (
2037 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2038 `account_id` int(11) NOT NULL,
2039 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2040 `name_reverse_relationship` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2041 `relationship_type_group_id` int(11) NOT NULL,
2042 `delible` tinyint(1) NOT NULL DEFAULT '0',
2043 `created_at` timestamp NULL DEFAULT NULL,
2044 `updated_at` timestamp NULL DEFAULT NULL,
2045 PRIMARY KEY (`id`)
2046) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2047/*!40101 SET character_set_client = @saved_cs_client */;
2048
2049--
2050-- Dumping data for table `monica_relationship_types`
2051--
2052
2053LOCK TABLES `monica_relationship_types` WRITE;
2054/*!40000 ALTER TABLE `monica_relationship_types` DISABLE KEYS */;
2055/*!40000 ALTER TABLE `monica_relationship_types` ENABLE KEYS */;
2056UNLOCK TABLES;
2057
2058--
2059-- Table structure for table `monica_relationships`
2060--
2061
2062DROP TABLE IF EXISTS `monica_relationships`;
2063/*!40101 SET @saved_cs_client = @@character_set_client */;
2064/*!40101 SET character_set_client = utf8 */;
2065CREATE TABLE `monica_relationships` (
2066 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2067 `account_id` int(11) NOT NULL,
2068 `relationship_type_id` int(11) NOT NULL,
2069 `contact_is` int(11) NOT NULL,
2070 `relationship_type_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2071 `of_contact` int(11) NOT NULL,
2072 `created_at` timestamp NULL DEFAULT NULL,
2073 `updated_at` timestamp NULL DEFAULT NULL,
2074 PRIMARY KEY (`id`)
2075) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2076/*!40101 SET character_set_client = @saved_cs_client */;
2077
2078--
2079-- Dumping data for table `monica_relationships`
2080--
2081
2082LOCK TABLES `monica_relationships` WRITE;
2083/*!40000 ALTER TABLE `monica_relationships` DISABLE KEYS */;
2084/*!40000 ALTER TABLE `monica_relationships` ENABLE KEYS */;
2085UNLOCK TABLES;
2086
2087--
2088-- Table structure for table `monica_reminder_outbox`
2089--
2090
2091DROP TABLE IF EXISTS `monica_reminder_outbox`;
2092/*!40101 SET @saved_cs_client = @@character_set_client */;
2093/*!40101 SET character_set_client = utf8 */;
2094CREATE TABLE `monica_reminder_outbox` (
2095 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2096 `account_id` int(10) unsigned NOT NULL,
2097 `reminder_id` int(10) unsigned NOT NULL,
2098 `user_id` int(10) unsigned NOT NULL,
2099 `planned_date` date NOT NULL,
2100 `nature` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'reminder',
2101 `notification_number_days_before` int(11) DEFAULT NULL,
2102 `created_at` timestamp NULL DEFAULT NULL,
2103 `updated_at` timestamp NULL DEFAULT NULL,
2104 PRIMARY KEY (`id`),
2105 KEY `reminder_outbox_account_id_foreign` (`account_id`),
2106 KEY `reminder_outbox_reminder_id_foreign` (`reminder_id`),
2107 KEY `reminder_outbox_user_id_foreign` (`user_id`),
2108 CONSTRAINT `reminder_outbox_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
2109 CONSTRAINT `reminder_outbox_reminder_id_foreign` FOREIGN KEY (`reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE CASCADE,
2110 CONSTRAINT `reminder_outbox_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
2111) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2112/*!40101 SET character_set_client = @saved_cs_client */;
2113
2114--
2115-- Dumping data for table `monica_reminder_outbox`
2116--
2117
2118LOCK TABLES `monica_reminder_outbox` WRITE;
2119/*!40000 ALTER TABLE `monica_reminder_outbox` DISABLE KEYS */;
2120/*!40000 ALTER TABLE `monica_reminder_outbox` ENABLE KEYS */;
2121UNLOCK TABLES;
2122
2123--
2124-- Table structure for table `monica_reminder_rules`
2125--
2126
2127DROP TABLE IF EXISTS `monica_reminder_rules`;
2128/*!40101 SET @saved_cs_client = @@character_set_client */;
2129/*!40101 SET character_set_client = utf8 */;
2130CREATE TABLE `monica_reminder_rules` (
2131 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2132 `account_id` int(10) unsigned NOT NULL,
2133 `number_of_days_before` int(11) NOT NULL,
2134 `active` tinyint(1) NOT NULL DEFAULT '1',
2135 `created_at` timestamp NULL DEFAULT NULL,
2136 `updated_at` timestamp NULL DEFAULT NULL,
2137 PRIMARY KEY (`id`),
2138 KEY `reminder_rules_account_id_foreign` (`account_id`),
2139 CONSTRAINT `reminder_rules_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
2140) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2141/*!40101 SET character_set_client = @saved_cs_client */;
2142
2143--
2144-- Dumping data for table `monica_reminder_rules`
2145--
2146
2147LOCK TABLES `monica_reminder_rules` WRITE;
2148/*!40000 ALTER TABLE `monica_reminder_rules` DISABLE KEYS */;
2149/*!40000 ALTER TABLE `monica_reminder_rules` ENABLE KEYS */;
2150UNLOCK TABLES;
2151
2152--
2153-- Table structure for table `monica_reminder_sent`
2154--
2155
2156DROP TABLE IF EXISTS `monica_reminder_sent`;
2157/*!40101 SET @saved_cs_client = @@character_set_client */;
2158/*!40101 SET character_set_client = utf8 */;
2159CREATE TABLE `monica_reminder_sent` (
2160 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2161 `account_id` int(10) unsigned NOT NULL,
2162 `reminder_id` int(10) unsigned DEFAULT NULL,
2163 `user_id` int(10) unsigned NOT NULL,
2164 `planned_date` date NOT NULL,
2165 `sent_date` datetime NOT NULL,
2166 `nature` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'reminder',
2167 `frequency_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2168 `frequency_number` int(11) DEFAULT NULL,
2169 `html_content` longtext COLLATE utf8mb4_unicode_ci,
2170 `text_content` longtext COLLATE utf8mb4_unicode_ci,
2171 `created_at` timestamp NULL DEFAULT NULL,
2172 `updated_at` timestamp NULL DEFAULT NULL,
2173 PRIMARY KEY (`id`),
2174 KEY `reminder_sent_account_id_foreign` (`account_id`),
2175 KEY `reminder_sent_reminder_id_foreign` (`reminder_id`),
2176 KEY `reminder_sent_user_id_foreign` (`user_id`),
2177 CONSTRAINT `reminder_sent_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
2178 CONSTRAINT `reminder_sent_reminder_id_foreign` FOREIGN KEY (`reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
2179 CONSTRAINT `reminder_sent_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
2180) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2181/*!40101 SET character_set_client = @saved_cs_client */;
2182
2183--
2184-- Dumping data for table `monica_reminder_sent`
2185--
2186
2187LOCK TABLES `monica_reminder_sent` WRITE;
2188/*!40000 ALTER TABLE `monica_reminder_sent` DISABLE KEYS */;
2189/*!40000 ALTER TABLE `monica_reminder_sent` ENABLE KEYS */;
2190UNLOCK TABLES;
2191
2192--
2193-- Table structure for table `monica_reminders`
2194--
2195
2196DROP TABLE IF EXISTS `monica_reminders`;
2197/*!40101 SET @saved_cs_client = @@character_set_client */;
2198/*!40101 SET character_set_client = utf8 */;
2199CREATE TABLE `monica_reminders` (
2200 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2201 `account_id` int(10) unsigned NOT NULL,
2202 `contact_id` int(10) unsigned NOT NULL,
2203 `initial_date` date NOT NULL,
2204 `title` mediumtext COLLATE utf8mb4_unicode_ci,
2205 `description` longtext COLLATE utf8mb4_unicode_ci,
2206 `frequency_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2207 `frequency_number` int(11) DEFAULT NULL,
2208 `delible` tinyint(1) NOT NULL DEFAULT '1',
2209 `inactive` tinyint(1) NOT NULL DEFAULT '0',
2210 `created_at` timestamp NULL DEFAULT NULL,
2211 `updated_at` timestamp NULL DEFAULT NULL,
2212 PRIMARY KEY (`id`),
2213 KEY `reminders_account_id_foreign` (`account_id`),
2214 KEY `reminders_contact_id_foreign` (`contact_id`),
2215 CONSTRAINT `reminders_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
2216 CONSTRAINT `reminders_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
2217) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2218/*!40101 SET character_set_client = @saved_cs_client */;
2219
2220--
2221-- Dumping data for table `monica_reminders`
2222--
2223
2224LOCK TABLES `monica_reminders` WRITE;
2225/*!40000 ALTER TABLE `monica_reminders` DISABLE KEYS */;
2226/*!40000 ALTER TABLE `monica_reminders` ENABLE KEYS */;
2227UNLOCK TABLES;
2228
2229--
2230-- Table structure for table `monica_sessions`
2231--
2232
2233DROP TABLE IF EXISTS `monica_sessions`;
2234/*!40101 SET @saved_cs_client = @@character_set_client */;
2235/*!40101 SET character_set_client = utf8 */;
2236CREATE TABLE `monica_sessions` (
2237 `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2238 `user_id` int(11) DEFAULT NULL,
2239 `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2240 `user_agent` text COLLATE utf8mb4_unicode_ci,
2241 `payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
2242 `last_activity` int(11) NOT NULL,
2243 UNIQUE KEY `sessions_id_unique` (`id`)
2244) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2245/*!40101 SET character_set_client = @saved_cs_client */;
2246
2247--
2248-- Dumping data for table `monica_sessions`
2249--
2250
2251LOCK TABLES `monica_sessions` WRITE;
2252/*!40000 ALTER TABLE `monica_sessions` DISABLE KEYS */;
2253/*!40000 ALTER TABLE `monica_sessions` ENABLE KEYS */;
2254UNLOCK TABLES;
2255
2256--
2257-- Table structure for table `monica_special_dates`
2258--
2259
2260DROP TABLE IF EXISTS `monica_special_dates`;
2261/*!40101 SET @saved_cs_client = @@character_set_client */;
2262/*!40101 SET character_set_client = utf8 */;
2263CREATE TABLE `monica_special_dates` (
2264 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2265 `account_id` int(11) NOT NULL,
2266 `contact_id` int(11) NOT NULL,
2267 `uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2268 `is_age_based` tinyint(1) NOT NULL DEFAULT '0',
2269 `is_year_unknown` tinyint(1) NOT NULL DEFAULT '0',
2270 `date` date NOT NULL,
2271 `created_at` timestamp NULL DEFAULT NULL,
2272 `updated_at` timestamp NULL DEFAULT NULL,
2273 PRIMARY KEY (`id`),
2274 KEY `special_dates_account_id_uuid_index` (`account_id`,`uuid`)
2275) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2276/*!40101 SET character_set_client = @saved_cs_client */;
2277
2278--
2279-- Dumping data for table `monica_special_dates`
2280--
2281
2282LOCK TABLES `monica_special_dates` WRITE;
2283/*!40000 ALTER TABLE `monica_special_dates` DISABLE KEYS */;
2284/*!40000 ALTER TABLE `monica_special_dates` ENABLE KEYS */;
2285UNLOCK TABLES;
2286
2287--
2288-- Table structure for table `monica_statistics`
2289--
2290
2291DROP TABLE IF EXISTS `monica_statistics`;
2292/*!40101 SET @saved_cs_client = @@character_set_client */;
2293/*!40101 SET character_set_client = utf8 */;
2294CREATE TABLE `monica_statistics` (
2295 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2296 `number_of_users` int(11) NOT NULL,
2297 `number_of_contacts` int(11) NOT NULL,
2298 `number_of_notes` int(11) NOT NULL,
2299 `number_of_oauth_access_tokens` int(11) NOT NULL,
2300 `number_of_oauth_clients` int(11) NOT NULL,
2301 `number_of_offsprings` int(11) NOT NULL,
2302 `number_of_progenitors` int(11) NOT NULL,
2303 `number_of_relationships` int(11) NOT NULL,
2304 `number_of_subscriptions` int(11) NOT NULL,
2305 `number_of_reminders` int(11) NOT NULL,
2306 `number_of_tasks` int(11) NOT NULL,
2307 `number_of_kids` int(11) NOT NULL,
2308 `number_of_activities` int(11) NOT NULL,
2309 `number_of_addresses` int(11) NOT NULL,
2310 `number_of_api_calls` int(11) NOT NULL,
2311 `number_of_calls` int(11) NOT NULL,
2312 `number_of_contact_fields` int(11) NOT NULL,
2313 `number_of_contact_field_types` int(11) NOT NULL,
2314 `number_of_debts` int(11) NOT NULL,
2315 `number_of_entries` int(11) NOT NULL,
2316 `number_of_gifts` int(11) NOT NULL,
2317 `number_of_invitations_sent` int(11) DEFAULT NULL,
2318 `number_of_accounts_with_more_than_one_user` int(11) DEFAULT NULL,
2319 `number_of_tags` int(11) DEFAULT NULL,
2320 `number_of_import_jobs` int(11) DEFAULT NULL,
2321 `number_of_conversations` int(11) DEFAULT NULL,
2322 `number_of_messages` int(11) DEFAULT NULL,
2323 `created_at` timestamp NULL DEFAULT NULL,
2324 `updated_at` timestamp NULL DEFAULT NULL,
2325 PRIMARY KEY (`id`)
2326) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2327/*!40101 SET character_set_client = @saved_cs_client */;
2328
2329--
2330-- Dumping data for table `monica_statistics`
2331--
2332
2333LOCK TABLES `monica_statistics` WRITE;
2334/*!40000 ALTER TABLE `monica_statistics` DISABLE KEYS */;
2335/*!40000 ALTER TABLE `monica_statistics` ENABLE KEYS */;
2336UNLOCK TABLES;
2337
2338--
2339-- Table structure for table `monica_subscriptions`
2340--
2341
2342DROP TABLE IF EXISTS `monica_subscriptions`;
2343/*!40101 SET @saved_cs_client = @@character_set_client */;
2344/*!40101 SET character_set_client = utf8 */;
2345CREATE TABLE `monica_subscriptions` (
2346 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2347 `account_id` int(11) NOT NULL,
2348 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2349 `stripe_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2350 `stripe_plan` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2351 `quantity` int(11) NOT NULL,
2352 `trial_ends_at` timestamp NULL DEFAULT NULL,
2353 `ends_at` timestamp NULL DEFAULT NULL,
2354 `created_at` timestamp NULL DEFAULT NULL,
2355 `updated_at` timestamp NULL DEFAULT NULL,
2356 PRIMARY KEY (`id`)
2357) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2358/*!40101 SET character_set_client = @saved_cs_client */;
2359
2360--
2361-- Dumping data for table `monica_subscriptions`
2362--
2363
2364LOCK TABLES `monica_subscriptions` WRITE;
2365/*!40000 ALTER TABLE `monica_subscriptions` DISABLE KEYS */;
2366/*!40000 ALTER TABLE `monica_subscriptions` ENABLE KEYS */;
2367UNLOCK TABLES;
2368
2369--
2370-- Table structure for table `monica_synctoken`
2371--
2372
2373DROP TABLE IF EXISTS `monica_synctoken`;
2374/*!40101 SET @saved_cs_client = @@character_set_client */;
2375/*!40101 SET character_set_client = utf8 */;
2376CREATE TABLE `monica_synctoken` (
2377 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2378 `account_id` int(10) unsigned NOT NULL,
2379 `user_id` int(10) unsigned NOT NULL,
2380 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'contacts',
2381 `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
2382 `created_at` timestamp NULL DEFAULT NULL,
2383 `updated_at` timestamp NULL DEFAULT NULL,
2384 PRIMARY KEY (`id`),
2385 KEY `synctoken_user_id_foreign` (`user_id`),
2386 KEY `synctoken_account_id_user_id_name_index` (`account_id`,`user_id`,`name`),
2387 CONSTRAINT `synctoken_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
2388 CONSTRAINT `synctoken_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
2389) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2390/*!40101 SET character_set_client = @saved_cs_client */;
2391
2392--
2393-- Dumping data for table `monica_synctoken`
2394--
2395
2396LOCK TABLES `monica_synctoken` WRITE;
2397/*!40000 ALTER TABLE `monica_synctoken` DISABLE KEYS */;
2398/*!40000 ALTER TABLE `monica_synctoken` ENABLE KEYS */;
2399UNLOCK TABLES;
2400
2401--
2402-- Table structure for table `monica_tags`
2403--
2404
2405DROP TABLE IF EXISTS `monica_tags`;
2406/*!40101 SET @saved_cs_client = @@character_set_client */;
2407/*!40101 SET character_set_client = utf8 */;
2408CREATE TABLE `monica_tags` (
2409 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2410 `account_id` int(11) NOT NULL,
2411 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2412 `name_slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2413 `description` mediumtext COLLATE utf8mb4_unicode_ci,
2414 `created_at` timestamp NULL DEFAULT NULL,
2415 `updated_at` timestamp NULL DEFAULT NULL,
2416 PRIMARY KEY (`id`)
2417) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2418/*!40101 SET character_set_client = @saved_cs_client */;
2419
2420--
2421-- Dumping data for table `monica_tags`
2422--
2423
2424LOCK TABLES `monica_tags` WRITE;
2425/*!40000 ALTER TABLE `monica_tags` DISABLE KEYS */;
2426/*!40000 ALTER TABLE `monica_tags` ENABLE KEYS */;
2427UNLOCK TABLES;
2428
2429--
2430-- Table structure for table `monica_tasks`
2431--
2432
2433DROP TABLE IF EXISTS `monica_tasks`;
2434/*!40101 SET @saved_cs_client = @@character_set_client */;
2435/*!40101 SET character_set_client = utf8 */;
2436CREATE TABLE `monica_tasks` (
2437 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2438 `account_id` int(11) NOT NULL,
2439 `contact_id` int(10) unsigned DEFAULT NULL,
2440 `uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2441 `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2442 `description` longtext COLLATE utf8mb4_unicode_ci,
2443 `completed` tinyint(1) NOT NULL DEFAULT '0',
2444 `completed_at` datetime DEFAULT NULL,
2445 `created_at` timestamp NULL DEFAULT NULL,
2446 `updated_at` timestamp NULL DEFAULT NULL,
2447 PRIMARY KEY (`id`),
2448 KEY `tasks_account_id_uuid_index` (`account_id`,`uuid`)
2449) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2450/*!40101 SET character_set_client = @saved_cs_client */;
2451
2452--
2453-- Dumping data for table `monica_tasks`
2454--
2455
2456LOCK TABLES `monica_tasks` WRITE;
2457/*!40000 ALTER TABLE `monica_tasks` DISABLE KEYS */;
2458/*!40000 ALTER TABLE `monica_tasks` ENABLE KEYS */;
2459UNLOCK TABLES;
2460
2461--
2462-- Table structure for table `monica_term_user`
2463--
2464
2465DROP TABLE IF EXISTS `monica_term_user`;
2466/*!40101 SET @saved_cs_client = @@character_set_client */;
2467/*!40101 SET character_set_client = utf8 */;
2468CREATE TABLE `monica_term_user` (
2469 `account_id` int(10) unsigned NOT NULL,
2470 `user_id` int(10) unsigned NOT NULL,
2471 `term_id` int(10) unsigned NOT NULL,
2472 `ip_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2473 `created_at` timestamp NULL DEFAULT NULL,
2474 `updated_at` timestamp NULL DEFAULT NULL
2475) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2476/*!40101 SET character_set_client = @saved_cs_client */;
2477
2478--
2479-- Dumping data for table `monica_term_user`
2480--
2481
2482LOCK TABLES `monica_term_user` WRITE;
2483/*!40000 ALTER TABLE `monica_term_user` DISABLE KEYS */;
2484/*!40000 ALTER TABLE `monica_term_user` ENABLE KEYS */;
2485UNLOCK TABLES;
2486
2487--
2488-- Table structure for table `monica_terms`
2489--
2490
2491DROP TABLE IF EXISTS `monica_terms`;
2492/*!40101 SET @saved_cs_client = @@character_set_client */;
2493/*!40101 SET character_set_client = utf8 */;
2494CREATE TABLE `monica_terms` (
2495 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2496 `term_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2497 `term_content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
2498 `privacy_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2499 `privacy_content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
2500 `created_at` timestamp NULL DEFAULT NULL,
2501 `updated_at` timestamp NULL DEFAULT NULL,
2502 PRIMARY KEY (`id`)
2503) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2504/*!40101 SET character_set_client = @saved_cs_client */;
2505
2506--
2507-- Dumping data for table `monica_terms`
2508--
2509
2510LOCK TABLES `monica_terms` WRITE;
2511/*!40000 ALTER TABLE `monica_terms` DISABLE KEYS */;
2512INSERT INTO `monica_terms` VALUES (1,'2','\nScope of service\nMonica supports the following browsers:\n\nInternet Explorer (11+)\nFirefox (50+)\nChrome (latest)\nSafari (latest)\nI do not guarantee that the site will work with other browsers, but it’s very likely that it will just work.\n\nRights\nYou don’t have to provide your real name when you register to an account. You do however need a valid email address if you want to upgrade your account to the paid version, or receive reminders by email.\n\nYou have the right to close your account at any time.\n\nYou have the right to export your data at any time, in the SQL format.\n\nYour data will not be intentionally shown to other users or shared with third parties.\n\nYour personal data will not be shared with anyone without your consent.\n\nYour data is backed up every hour.\n\nIf the site ceases operation, you will receive an opportunity to export all your data before the site dies.\n\nAny new features that affect privacy will be strictly opt-in.\n\nResponsibilities\nYou will not use the site to store illegal information or data under the Canadian law (or any law).\n\nYou have to be at least 18+ to create an account and use the site.\n\nYou must not abuse the site by knowingly posting malicious code that could harm you or the other users.\n\nYou must only use the site to do things that are widely accepted as morally good.\n\nYou may not make automated requests to the site.\n\nYou may not abuse the invitation system.\n\nYou are responsible for keeping your account secure.\n\nI reserve the right to close accounts that abuse the system (thousands of contacts with hundred of thousands of reminders for instance) or use it in an unreasonable manner.\n\nOther important legal stuff\nThough I want to provide a great service, there are certain things about the service I cannot promise. For example, the services and software are provided “as-isâ€, at your own risk, without express or implied warranty or condition of any kind. I also disclaim any warranties of merchantability, fitness for a particular purpose or non-infringement. Monica will have no responsibility for any harm to your computer system, loss or corruption of data, or other harm that results from your access to or use of the Services or Software.\n\nThese Terms can change at any time, but I’ll never be a dick about it. Running this site is a dream come true to me, and I hope I’ll be able to run it as long as I can.\n ','2','\nMonica is an open source project. The hosted version has a premium plan that let us collect money so we can pay for the servers and additional servers, but the main goal is not to make money (otherwise we wouldn’t have opened source it).\n\nMonica comes in two flavors: you can either use our hosted version, or download it and run it yourself. In the latter case, we do not track anything at all. We don’t know that you’ve even downloaded the product. Do whatever you want with it (but respect your local laws).\n\nWhen you create your account on our hosted version, you are giving the site information about yourself that we collect. This includes your name, your email address and your password, that is encrypted before being stored. We do not store any other personal information.\n\nWhen you login to the service, we are using cookies to remember your login credentials. This is the only use we do with the cookies.\n\nMonica runs on Linode and we are the only ones, apart from Linode’s employees, who have access to those servers.\n\nWe do hourly backups of the database.\n\nYour password is encrypted with bcrypt, a password hashing algorithm that is highly secure. You can also activate two factor authentication on your account if you need an extra layer of security. Apart from those encryptions mechanism, your data is not encrypted in the database. If someone gets access to the database, they will be able to read your data. We do our best to make sure that this will never happen, but it can happen.\n\nIf a data breach happens, we will contact the users who are affected to warn them about the breach.\n\nTransactional emails are dserved through Postmark.\n\nWe use an open source tool called Sentry to track errors that happen in production. Their service records the errors, but they don’t have access to any information apart the account ID, which lets me debug what’s going on.\n\nThe site does not currently and will never show ads. It also does not, and don’t intend to, sell data to a third party, with or without your consent. We are just against this. Fuck ads.\n\nWe do no use any tracking third parties, like Google Analytics or Intercom, that track user behaviours or data, neither on the marketing site or the hosted version. We are deeply against their principles as they would use those data to profile you, which we are totally against.\n\nAll the data you put on Monica belongs to you. We do not have any rights on it. Please don’t put illegal stuff on it, otherwise we’d be in trouble.\n\nAll the information about the contacts you put on Monica are private to you. We do not cross link information between accounts or use one information in an account to populate another account (unlike Facebook for instance).\n\nWe use Stripe to collect payments made to access the paid version. We do not store credit card information or anything concerning the transactions themselves on our servers. However, as per the open source library we use to process the payments (Laravel Cashier), we store the last 4 digits of the credit card, the brand name (VISA or MasterCard). As a user, you are identified on Stripe by a random number that they generate and use.\n\nRegarding the payments, you can downgrade to the free plan whenever you like. When you do, Stripe is automatically updated and we have no way to charge you again, even if we would like to. The less we deal with payment information, the happier we are.\n\nYou can export your data at any time. You can also use the API to export all your data if you know how to do it. You can also request that we process this ourselves and send it to you. Your data will be exported in the SQL format.\n\nWhen you close your account, we immediately destroy all your personal information and don’t keep any backup. While you have control over this, we can delete an account for you if you ask us.\n\nIn certain situations, we may be required to disclose peronal data in response to lawful requests by public authorities, including to met national security or law enforcements requirements. We just hope that this never happens.\n\nIf you violate the terms of use we will terminate your account and notify you about it. However if you follow the \"don’t be a dick\" policy, nothing should ever happen to you and we’ll all be happy.\n\nMonica uses only open-source projects that are mainly hosted on Github.\n\nWe will update this privacy policy as soon as we introduce new information practices. If we do, we will send an email to the email address specified in your account. We will never be a dick about it and will never, ever, introduce something in what we do that will affect your right to the absolute privacy.','2018-04-12 00:00:00',NULL);
2513/*!40000 ALTER TABLE `monica_terms` ENABLE KEYS */;
2514UNLOCK TABLES;
2515
2516--
2517-- Table structure for table `monica_u2f_key`
2518--
2519
2520DROP TABLE IF EXISTS `monica_u2f_key`;
2521/*!40101 SET @saved_cs_client = @@character_set_client */;
2522/*!40101 SET character_set_client = utf8 */;
2523CREATE TABLE `monica_u2f_key` (
2524 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2525 `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'key',
2526 `user_id` int(10) unsigned NOT NULL,
2527 `keyHandle` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2528 `publicKey` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2529 `certificate` text COLLATE utf8mb4_unicode_ci NOT NULL,
2530 `counter` int(11) NOT NULL,
2531 `created_at` timestamp NULL DEFAULT NULL,
2532 `updated_at` timestamp NULL DEFAULT NULL,
2533 PRIMARY KEY (`id`),
2534 UNIQUE KEY `u2f_key_publickey_unique` (`publicKey`),
2535 KEY `u2f_key_user_id_foreign` (`user_id`),
2536 CONSTRAINT `u2f_key_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
2537) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2538/*!40101 SET character_set_client = @saved_cs_client */;
2539
2540--
2541-- Dumping data for table `monica_u2f_key`
2542--
2543
2544LOCK TABLES `monica_u2f_key` WRITE;
2545/*!40000 ALTER TABLE `monica_u2f_key` DISABLE KEYS */;
2546/*!40000 ALTER TABLE `monica_u2f_key` ENABLE KEYS */;
2547UNLOCK TABLES;
2548
2549--
2550-- Table structure for table `monica_users`
2551--
2552
2553DROP TABLE IF EXISTS `monica_users`;
2554/*!40101 SET @saved_cs_client = @@character_set_client */;
2555/*!40101 SET character_set_client = utf8 */;
2556CREATE TABLE `monica_users` (
2557 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2558 `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2559 `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2560 `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2561 `admin` tinyint(1) NOT NULL DEFAULT '0',
2562 `email_verified_at` timestamp NULL DEFAULT NULL,
2563 `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
2564 `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2565 `google2fa_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2566 `account_id` int(11) NOT NULL,
2567 `timezone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
2568 `currency_id` int(11) NOT NULL DEFAULT '2',
2569 `locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
2570 `metric` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fahrenheit',
2571 `fluid_container` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'false',
2572 `contacts_sort_order` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'firstnameAZ',
2573 `name_order` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'firstname_lastname_nickname',
2574 `invited_by_user_id` int(11) DEFAULT NULL,
2575 `dashboard_active_tab` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'calls',
2576 `gifts_active_tab` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ideas',
2577 `profile_active_tab` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'notes',
2578 `profile_new_life_event_badge_seen` tinyint(1) NOT NULL DEFAULT '0',
2579 `temperature_scale` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT 'celsius',
2580 `created_at` timestamp NULL DEFAULT NULL,
2581 `updated_at` timestamp NULL DEFAULT NULL,
2582 PRIMARY KEY (`id`),
2583 UNIQUE KEY `users_email_unique` (`email`)
2584) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2585/*!40101 SET character_set_client = @saved_cs_client */;
2586
2587--
2588-- Dumping data for table `monica_users`
2589--
2590
2591LOCK TABLES `monica_users` WRITE;
2592/*!40000 ALTER TABLE `monica_users` DISABLE KEYS */;
2593/*!40000 ALTER TABLE `monica_users` ENABLE KEYS */;
2594UNLOCK TABLES;
2595
2596--
2597-- Table structure for table `monica_weather`
2598--
2599
2600DROP TABLE IF EXISTS `monica_weather`;
2601/*!40101 SET @saved_cs_client = @@character_set_client */;
2602/*!40101 SET character_set_client = utf8 */;
2603CREATE TABLE `monica_weather` (
2604 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2605 `account_id` int(10) unsigned NOT NULL,
2606 `place_id` int(10) unsigned NOT NULL,
2607 `weather_json` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL,
2608 `created_at` timestamp NULL DEFAULT NULL,
2609 `updated_at` timestamp NULL DEFAULT NULL,
2610 PRIMARY KEY (`id`),
2611 KEY `weather_account_id_foreign` (`account_id`),
2612 KEY `weather_place_id_foreign` (`place_id`),
2613 CONSTRAINT `weather_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
2614 CONSTRAINT `weather_place_id_foreign` FOREIGN KEY (`place_id`) REFERENCES `monica_places` (`id`) ON DELETE CASCADE
2615) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2616/*!40101 SET character_set_client = @saved_cs_client */;
2617
2618--
2619-- Dumping data for table `monica_weather`
2620--
2621
2622LOCK TABLES `monica_weather` WRITE;
2623/*!40000 ALTER TABLE `monica_weather` DISABLE KEYS */;
2624/*!40000 ALTER TABLE `monica_weather` ENABLE KEYS */;
2625UNLOCK TABLES;
2626/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2627
2628/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2629/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
2630/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
2631/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
2632/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
2633/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
2634/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
2635
2636-- Dump completed on 2019-02-20 16:07:10