Skip to content

Instantly share code, notes, and snippets.

@wcypierre
Created February 20, 2019 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wcypierre/82020218c31ca7659b949f9ca382afc9 to your computer and use it in GitHub Desktop.
Save wcypierre/82020218c31ca7659b949f9ca382afc9 to your computer and use it in GitHub Desktop.
Monica SQL Structure for Commit b329affb2a2f61fd7019649c5137d7dd463c49fb
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: monica
-- ------------------------------------------------------
-- Server version 10.1.38-MariaDB-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `monica`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `monica` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `monica`;
--
-- Table structure for table `monica_accounts`
--
DROP TABLE IF EXISTS `monica_accounts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_accounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`has_access_to_paid_version_for_free` tinyint(1) NOT NULL DEFAULT '0',
`api_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`number_of_invitations_sent` int(11) DEFAULT NULL,
`default_time_reminder_is_sent` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '12:00',
`stripe_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`card_brand` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`card_last_four` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`trial_ends_at` timestamp NULL DEFAULT NULL,
`legacy_free_plan_unlimited_contacts` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_accounts`
--
LOCK TABLES `monica_accounts` WRITE;
/*!40000 ALTER TABLE `monica_accounts` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_accounts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_activities`
--
DROP TABLE IF EXISTS `monica_activities`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_activities` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`activity_type_id` int(10) unsigned DEFAULT NULL,
`summary` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` longtext COLLATE utf8mb4_unicode_ci,
`date_it_happened` datetime NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `activities_account_id_foreign` (`account_id`),
KEY `activities_activity_type_id_foreign` (`activity_type_id`),
CONSTRAINT `activities_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `activities_activity_type_id_foreign` FOREIGN KEY (`activity_type_id`) REFERENCES `monica_activity_types` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_activities`
--
LOCK TABLES `monica_activities` WRITE;
/*!40000 ALTER TABLE `monica_activities` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_activities` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_activity_contact`
--
DROP TABLE IF EXISTS `monica_activity_contact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_activity_contact` (
`activity_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`account_id` int(10) unsigned NOT NULL,
KEY `activity_contact_activity_id_foreign` (`activity_id`),
KEY `activity_contact_contact_id_foreign` (`contact_id`),
KEY `activity_contact_account_id_foreign` (`account_id`),
CONSTRAINT `activity_contact_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `activity_contact_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `monica_activities` (`id`) ON DELETE CASCADE,
CONSTRAINT `activity_contact_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_activity_contact`
--
LOCK TABLES `monica_activity_contact` WRITE;
/*!40000 ALTER TABLE `monica_activity_contact` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_activity_contact` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_activity_statistics`
--
DROP TABLE IF EXISTS `monica_activity_statistics`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_activity_statistics` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`year` int(11) NOT NULL,
`count` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_activity_statistics`
--
LOCK TABLES `monica_activity_statistics` WRITE;
/*!40000 ALTER TABLE `monica_activity_statistics` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_activity_statistics` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_activity_type_categories`
--
DROP TABLE IF EXISTS `monica_activity_type_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_activity_type_categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `activity_type_categories_account_id_foreign` (`account_id`),
CONSTRAINT `activity_type_categories_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_activity_type_categories`
--
LOCK TABLES `monica_activity_type_categories` WRITE;
/*!40000 ALTER TABLE `monica_activity_type_categories` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_activity_type_categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_activity_types`
--
DROP TABLE IF EXISTS `monica_activity_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_activity_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`activity_type_category_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`location_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `activity_types_account_id_foreign` (`account_id`),
KEY `activity_types_activity_type_category_id_foreign` (`activity_type_category_id`),
CONSTRAINT `activity_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `activity_types_activity_type_category_id_foreign` FOREIGN KEY (`activity_type_category_id`) REFERENCES `monica_activity_type_categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_activity_types`
--
LOCK TABLES `monica_activity_types` WRITE;
/*!40000 ALTER TABLE `monica_activity_types` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_activity_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_addresses`
--
DROP TABLE IF EXISTS `monica_addresses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_addresses` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`place_id` int(10) unsigned DEFAULT NULL,
`contact_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `addresses_account_id_foreign` (`account_id`),
KEY `addresses_contact_id_foreign` (`contact_id`),
KEY `addresses_place_id_foreign` (`place_id`),
CONSTRAINT `addresses_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `addresses_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
CONSTRAINT `addresses_place_id_foreign` FOREIGN KEY (`place_id`) REFERENCES `monica_places` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_addresses`
--
LOCK TABLES `monica_addresses` WRITE;
/*!40000 ALTER TABLE `monica_addresses` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_addresses` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_api_usage`
--
DROP TABLE IF EXISTS `monica_api_usage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_api_usage` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`client_ip` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_api_usage`
--
LOCK TABLES `monica_api_usage` WRITE;
/*!40000 ALTER TABLE `monica_api_usage` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_api_usage` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_cache`
--
DROP TABLE IF EXISTS `monica_cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_cache` (
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
`expiration` int(11) NOT NULL,
UNIQUE KEY `cache_key_unique` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_cache`
--
LOCK TABLES `monica_cache` WRITE;
/*!40000 ALTER TABLE `monica_cache` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_cache` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_calls`
--
DROP TABLE IF EXISTS `monica_calls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_calls` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`called_at` datetime NOT NULL,
`content` mediumtext COLLATE utf8mb4_unicode_ci,
`contact_called` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_calls`
--
LOCK TABLES `monica_calls` WRITE;
/*!40000 ALTER TABLE `monica_calls` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_calls` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_companies`
--
DROP TABLE IF EXISTS `monica_companies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_companies` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`number_of_employees` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `companies_account_id_foreign` (`account_id`),
CONSTRAINT `companies_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_companies`
--
LOCK TABLES `monica_companies` WRITE;
/*!40000 ALTER TABLE `monica_companies` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_companies` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_contact_field_types`
--
DROP TABLE IF EXISTS `monica_contact_field_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_contact_field_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`fontawesome_icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`protocol` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '1',
`type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `contact_field_types_account_id_foreign` (`account_id`),
CONSTRAINT `contact_field_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_contact_field_types`
--
LOCK TABLES `monica_contact_field_types` WRITE;
/*!40000 ALTER TABLE `monica_contact_field_types` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_contact_field_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_contact_fields`
--
DROP TABLE IF EXISTS `monica_contact_fields`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_contact_fields` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`contact_field_type_id` int(10) unsigned NOT NULL,
`data` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `contact_fields_account_id_foreign` (`account_id`),
KEY `contact_fields_contact_id_foreign` (`contact_id`),
KEY `contact_fields_contact_field_type_id_foreign` (`contact_field_type_id`),
CONSTRAINT `contact_fields_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `contact_fields_contact_field_type_id_foreign` FOREIGN KEY (`contact_field_type_id`) REFERENCES `monica_contact_field_types` (`id`) ON DELETE CASCADE,
CONSTRAINT `contact_fields_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_contact_fields`
--
LOCK TABLES `monica_contact_fields` WRITE;
/*!40000 ALTER TABLE `monica_contact_fields` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_contact_fields` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_contact_photo`
--
DROP TABLE IF EXISTS `monica_contact_photo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_contact_photo` (
`contact_id` int(10) unsigned NOT NULL,
`photo_id` int(10) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
KEY `contact_photo_photo_id_foreign` (`photo_id`),
KEY `contact_photo_contact_id_foreign` (`contact_id`),
CONSTRAINT `contact_photo_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
CONSTRAINT `contact_photo_photo_id_foreign` FOREIGN KEY (`photo_id`) REFERENCES `monica_photos` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_contact_photo`
--
LOCK TABLES `monica_contact_photo` WRITE;
/*!40000 ALTER TABLE `monica_contact_photo` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_contact_photo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_contact_tag`
--
DROP TABLE IF EXISTS `monica_contact_tag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_contact_tag` (
`contact_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
`account_id` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_contact_tag`
--
LOCK TABLES `monica_contact_tag` WRITE;
/*!40000 ALTER TABLE `monica_contact_tag` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_contact_tag` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_contacts`
--
DROP TABLE IF EXISTS `monica_contacts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_contacts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`middle_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`nickname` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`gender_id` int(11) NOT NULL,
`description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_starred` tinyint(1) NOT NULL DEFAULT '0',
`is_partial` tinyint(1) NOT NULL DEFAULT '0',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`is_dead` tinyint(1) NOT NULL DEFAULT '0',
`deceased_special_date_id` int(10) unsigned DEFAULT NULL,
`deceased_reminder_id` int(10) unsigned DEFAULT NULL,
`last_talked_to` date DEFAULT NULL,
`stay_in_touch_frequency` int(11) DEFAULT NULL,
`stay_in_touch_trigger_date` datetime DEFAULT NULL,
`birthday_special_date_id` int(10) unsigned DEFAULT NULL,
`birthday_reminder_id` int(10) unsigned DEFAULT NULL,
`first_met_through_contact_id` int(11) DEFAULT NULL,
`first_met_special_date_id` int(10) unsigned DEFAULT NULL,
`first_met_reminder_id` int(10) unsigned DEFAULT NULL,
`first_met_where` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`first_met_additional_info` longtext COLLATE utf8mb4_unicode_ci,
`job` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`company` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`food_preferencies` longtext COLLATE utf8mb4_unicode_ci,
`has_avatar` tinyint(1) NOT NULL DEFAULT '0',
`avatar_external_url` varchar(400) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`avatar_file_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`avatar_location` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'local',
`gravatar_url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_consulted_at` timestamp NULL DEFAULT NULL,
`number_of_views` int(11) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`default_avatar_color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`has_avatar_bool` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `contacts_birthday_reminder_id_foreign` (`birthday_reminder_id`),
KEY `contacts_first_met_reminder_id_foreign` (`first_met_reminder_id`),
KEY `contacts_deceased_reminder_id_foreign` (`deceased_reminder_id`),
KEY `contacts_birthday_special_date_id_foreign` (`birthday_special_date_id`),
KEY `contacts_first_met_special_date_id_foreign` (`first_met_special_date_id`),
KEY `contacts_deceased_special_date_id_foreign` (`deceased_special_date_id`),
KEY `contacts_account_id_uuid_index` (`account_id`,`uuid`),
CONSTRAINT `contacts_birthday_reminder_id_foreign` FOREIGN KEY (`birthday_reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
CONSTRAINT `contacts_birthday_special_date_id_foreign` FOREIGN KEY (`birthday_special_date_id`) REFERENCES `monica_special_dates` (`id`) ON DELETE SET NULL,
CONSTRAINT `contacts_deceased_reminder_id_foreign` FOREIGN KEY (`deceased_reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
CONSTRAINT `contacts_deceased_special_date_id_foreign` FOREIGN KEY (`deceased_special_date_id`) REFERENCES `monica_special_dates` (`id`) ON DELETE SET NULL,
CONSTRAINT `contacts_first_met_reminder_id_foreign` FOREIGN KEY (`first_met_reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
CONSTRAINT `contacts_first_met_special_date_id_foreign` FOREIGN KEY (`first_met_special_date_id`) REFERENCES `monica_special_dates` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_contacts`
--
LOCK TABLES `monica_contacts` WRITE;
/*!40000 ALTER TABLE `monica_contacts` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_contacts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_conversations`
--
DROP TABLE IF EXISTS `monica_conversations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_conversations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`contact_field_type_id` int(10) unsigned NOT NULL,
`happened_at` datetime NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `conversations_account_id_foreign` (`account_id`),
KEY `conversations_contact_id_foreign` (`contact_id`),
KEY `conversations_contact_field_type_id_foreign` (`contact_field_type_id`),
CONSTRAINT `conversations_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `conversations_contact_field_type_id_foreign` FOREIGN KEY (`contact_field_type_id`) REFERENCES `monica_contact_field_types` (`id`) ON DELETE CASCADE,
CONSTRAINT `conversations_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_conversations`
--
LOCK TABLES `monica_conversations` WRITE;
/*!40000 ALTER TABLE `monica_conversations` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_conversations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_currencies`
--
DROP TABLE IF EXISTS `monica_currencies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_currencies` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`iso` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`symbol` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_currencies`
--
LOCK TABLES `monica_currencies` WRITE;
/*!40000 ALTER TABLE `monica_currencies` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_currencies` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_days`
--
DROP TABLE IF EXISTS `monica_days`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_days` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`date` date NOT NULL,
`rate` int(11) NOT NULL,
`comment` mediumtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_days`
--
LOCK TABLES `monica_days` WRITE;
/*!40000 ALTER TABLE `monica_days` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_days` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_debts`
--
DROP TABLE IF EXISTS `monica_debts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_debts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`in_debt` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no',
`status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'inprogress',
`amount` decimal(8,2) NOT NULL,
`reason` longtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_debts`
--
LOCK TABLES `monica_debts` WRITE;
/*!40000 ALTER TABLE `monica_debts` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_debts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_activity_type_categories`
--
DROP TABLE IF EXISTS `monica_default_activity_type_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_activity_type_categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_activity_type_categories`
--
LOCK TABLES `monica_default_activity_type_categories` WRITE;
/*!40000 ALTER TABLE `monica_default_activity_type_categories` DISABLE KEYS */;
INSERT 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');
/*!40000 ALTER TABLE `monica_default_activity_type_categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_activity_types`
--
DROP TABLE IF EXISTS `monica_default_activity_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_activity_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`default_activity_type_category_id` int(11) NOT NULL,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`location_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_activity_types`
--
LOCK TABLES `monica_default_activity_types` WRITE;
/*!40000 ALTER TABLE `monica_default_activity_types` DISABLE KEYS */;
INSERT 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');
/*!40000 ALTER TABLE `monica_default_activity_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_contact_field_types`
--
DROP TABLE IF EXISTS `monica_default_contact_field_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_contact_field_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`fontawesome_icon` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`protocol` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`migrated` tinyint(1) NOT NULL DEFAULT '0',
`delible` tinyint(1) NOT NULL DEFAULT '1',
`type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_contact_field_types`
--
LOCK TABLES `monica_default_contact_field_types` WRITE;
/*!40000 ALTER TABLE `monica_default_contact_field_types` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_default_contact_field_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_contact_modules`
--
DROP TABLE IF EXISTS `monica_default_contact_modules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_contact_modules` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '0',
`active` tinyint(1) NOT NULL DEFAULT '1',
`migrated` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_contact_modules`
--
LOCK TABLES `monica_default_contact_modules` WRITE;
/*!40000 ALTER TABLE `monica_default_contact_modules` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_default_contact_modules` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_life_event_categories`
--
DROP TABLE IF EXISTS `monica_default_life_event_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_life_event_categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`migrated` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_life_event_categories`
--
LOCK TABLES `monica_default_life_event_categories` WRITE;
/*!40000 ALTER TABLE `monica_default_life_event_categories` DISABLE KEYS */;
INSERT 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');
/*!40000 ALTER TABLE `monica_default_life_event_categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_life_event_types`
--
DROP TABLE IF EXISTS `monica_default_life_event_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_life_event_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`default_life_event_category_id` int(10) unsigned NOT NULL,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`specific_information_structure` text COLLATE utf8mb4_unicode_ci,
`migrated` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `default_life_event_types_default_life_event_category_id_foreign` (`default_life_event_category_id`),
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
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_life_event_types`
--
LOCK TABLES `monica_default_life_event_types` WRITE;
/*!40000 ALTER TABLE `monica_default_life_event_types` DISABLE KEYS */;
INSERT 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');
/*!40000 ALTER TABLE `monica_default_life_event_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_relationship_type_groups`
--
DROP TABLE IF EXISTS `monica_default_relationship_type_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_relationship_type_groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '0',
`migrated` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_relationship_type_groups`
--
LOCK TABLES `monica_default_relationship_type_groups` WRITE;
/*!40000 ALTER TABLE `monica_default_relationship_type_groups` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_default_relationship_type_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_default_relationship_types`
--
DROP TABLE IF EXISTS `monica_default_relationship_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_default_relationship_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`name_reverse_relationship` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`relationship_type_group_id` int(11) NOT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '0',
`migrated` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_default_relationship_types`
--
LOCK TABLES `monica_default_relationship_types` WRITE;
/*!40000 ALTER TABLE `monica_default_relationship_types` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_default_relationship_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_documents`
--
DROP TABLE IF EXISTS `monica_documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_documents` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`original_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`new_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`filesize` int(11) DEFAULT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mime_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`number_of_downloads` int(11) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `documents_account_id_foreign` (`account_id`),
KEY `documents_contact_id_foreign` (`contact_id`),
CONSTRAINT `documents_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `documents_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_documents`
--
LOCK TABLES `monica_documents` WRITE;
/*!40000 ALTER TABLE `monica_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_documents` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_emotion_call`
--
DROP TABLE IF EXISTS `monica_emotion_call`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_emotion_call` (
`account_id` int(10) unsigned NOT NULL,
`call_id` int(10) unsigned NOT NULL,
`emotion_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
KEY `emotion_call_account_id_foreign` (`account_id`),
KEY `emotion_call_call_id_foreign` (`call_id`),
KEY `emotion_call_emotion_id_foreign` (`emotion_id`),
KEY `emotion_call_contact_id_foreign` (`contact_id`),
CONSTRAINT `emotion_call_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `emotion_call_call_id_foreign` FOREIGN KEY (`call_id`) REFERENCES `monica_calls` (`id`) ON DELETE CASCADE,
CONSTRAINT `emotion_call_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
CONSTRAINT `emotion_call_emotion_id_foreign` FOREIGN KEY (`emotion_id`) REFERENCES `monica_emotions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_emotion_call`
--
LOCK TABLES `monica_emotion_call` WRITE;
/*!40000 ALTER TABLE `monica_emotion_call` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_emotion_call` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_emotions`
--
DROP TABLE IF EXISTS `monica_emotions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_emotions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`emotion_primary_id` int(10) unsigned NOT NULL,
`emotion_secondary_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `emotions_emotion_primary_id_foreign` (`emotion_primary_id`),
KEY `emotions_emotion_secondary_id_foreign` (`emotion_secondary_id`),
CONSTRAINT `emotions_emotion_primary_id_foreign` FOREIGN KEY (`emotion_primary_id`) REFERENCES `monica_emotions_primary` (`id`) ON DELETE CASCADE,
CONSTRAINT `emotions_emotion_secondary_id_foreign` FOREIGN KEY (`emotion_secondary_id`) REFERENCES `monica_emotions_secondary` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_emotions`
--
LOCK TABLES `monica_emotions` WRITE;
/*!40000 ALTER TABLE `monica_emotions` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_emotions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_emotions_primary`
--
DROP TABLE IF EXISTS `monica_emotions_primary`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_emotions_primary` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_emotions_primary`
--
LOCK TABLES `monica_emotions_primary` WRITE;
/*!40000 ALTER TABLE `monica_emotions_primary` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_emotions_primary` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_emotions_secondary`
--
DROP TABLE IF EXISTS `monica_emotions_secondary`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_emotions_secondary` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`emotion_primary_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `emotions_secondary_emotion_primary_id_foreign` (`emotion_primary_id`),
CONSTRAINT `emotions_secondary_emotion_primary_id_foreign` FOREIGN KEY (`emotion_primary_id`) REFERENCES `monica_emotions_primary` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_emotions_secondary`
--
LOCK TABLES `monica_emotions_secondary` WRITE;
/*!40000 ALTER TABLE `monica_emotions_secondary` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_emotions_secondary` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_entries`
--
DROP TABLE IF EXISTS `monica_entries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_entries` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`post` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_entries`
--
LOCK TABLES `monica_entries` WRITE;
/*!40000 ALTER TABLE `monica_entries` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_entries` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_failed_jobs`
--
DROP TABLE IF EXISTS `monica_failed_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_failed_jobs` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_failed_jobs`
--
LOCK TABLES `monica_failed_jobs` WRITE;
/*!40000 ALTER TABLE `monica_failed_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_failed_jobs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_genders`
--
DROP TABLE IF EXISTS `monica_genders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_genders` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_genders`
--
LOCK TABLES `monica_genders` WRITE;
/*!40000 ALTER TABLE `monica_genders` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_genders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_gifts`
--
DROP TABLE IF EXISTS `monica_gifts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_gifts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`is_for` int(11) DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`comment` longtext COLLATE utf8mb4_unicode_ci,
`url` longtext COLLATE utf8mb4_unicode_ci,
`value` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_an_idea` tinyint(1) NOT NULL,
`has_been_offered` tinyint(1) NOT NULL,
`has_been_received` tinyint(1) DEFAULT NULL,
`offered_at` datetime DEFAULT NULL,
`received_at` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_gifts`
--
LOCK TABLES `monica_gifts` WRITE;
/*!40000 ALTER TABLE `monica_gifts` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_gifts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_import_job_reports`
--
DROP TABLE IF EXISTS `monica_import_job_reports`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_import_job_reports` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`import_job_id` int(11) NOT NULL,
`contact_information` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`skipped` tinyint(1) NOT NULL,
`skip_reason` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_import_job_reports`
--
LOCK TABLES `monica_import_job_reports` WRITE;
/*!40000 ALTER TABLE `monica_import_job_reports` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_import_job_reports` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_import_jobs`
--
DROP TABLE IF EXISTS `monica_import_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_import_jobs` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'vcard',
`contacts_found` int(11) DEFAULT NULL,
`contacts_skipped` int(11) DEFAULT NULL,
`contacts_imported` int(11) DEFAULT NULL,
`filename` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`started_at` date DEFAULT NULL,
`ended_at` date DEFAULT NULL,
`failed` tinyint(1) NOT NULL DEFAULT '0',
`failed_reason` mediumtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_import_jobs`
--
LOCK TABLES `monica_import_jobs` WRITE;
/*!40000 ALTER TABLE `monica_import_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_import_jobs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_instances`
--
DROP TABLE IF EXISTS `monica_instances`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_instances` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`current_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`latest_version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`latest_release_notes` mediumtext COLLATE utf8mb4_unicode_ci,
`number_of_versions_since_current_version` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_instances`
--
LOCK TABLES `monica_instances` WRITE;
/*!40000 ALTER TABLE `monica_instances` DISABLE KEYS */;
INSERT 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');
/*!40000 ALTER TABLE `monica_instances` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_invitations`
--
DROP TABLE IF EXISTS `monica_invitations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_invitations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`invited_by_user_id` int(11) NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`invitation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_invitations`
--
LOCK TABLES `monica_invitations` WRITE;
/*!40000 ALTER TABLE `monica_invitations` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_invitations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_jobs`
--
DROP TABLE IF EXISTS `monica_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`attempts` tinyint(3) unsigned NOT NULL,
`reserved_at` int(10) unsigned DEFAULT NULL,
`available_at` int(10) unsigned NOT NULL,
`created_at` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `jobs_queue_reserved_at_index` (`queue`,`reserved_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_jobs`
--
LOCK TABLES `monica_jobs` WRITE;
/*!40000 ALTER TABLE `monica_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_jobs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_journal_entries`
--
DROP TABLE IF EXISTS `monica_journal_entries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_journal_entries` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`date` datetime NOT NULL,
`journalable_id` int(11) NOT NULL,
`journalable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_journal_entries`
--
LOCK TABLES `monica_journal_entries` WRITE;
/*!40000 ALTER TABLE `monica_journal_entries` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_journal_entries` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_life_event_categories`
--
DROP TABLE IF EXISTS `monica_life_event_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_life_event_categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`default_life_event_category_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`core_monica_data` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `life_event_categories_account_id_foreign` (`account_id`),
CONSTRAINT `life_event_categories_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_life_event_categories`
--
LOCK TABLES `monica_life_event_categories` WRITE;
/*!40000 ALTER TABLE `monica_life_event_categories` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_life_event_categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_life_event_types`
--
DROP TABLE IF EXISTS `monica_life_event_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_life_event_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`life_event_category_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`default_life_event_type_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`core_monica_data` tinyint(1) NOT NULL DEFAULT '0',
`specific_information_structure` text COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `life_event_types_account_id_foreign` (`account_id`),
KEY `life_event_types_life_event_category_id_foreign` (`life_event_category_id`),
CONSTRAINT `life_event_types_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `life_event_types_life_event_category_id_foreign` FOREIGN KEY (`life_event_category_id`) REFERENCES `monica_life_event_categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_life_event_types`
--
LOCK TABLES `monica_life_event_types` WRITE;
/*!40000 ALTER TABLE `monica_life_event_types` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_life_event_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_life_events`
--
DROP TABLE IF EXISTS `monica_life_events`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_life_events` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`life_event_type_id` int(10) unsigned NOT NULL,
`reminder_id` int(10) unsigned DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`note` mediumtext COLLATE utf8mb4_unicode_ci,
`happened_at` datetime NOT NULL,
`happened_at_month_unknown` tinyint(1) NOT NULL DEFAULT '0',
`happened_at_day_unknown` tinyint(1) NOT NULL DEFAULT '0',
`specific_information` text COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `life_events_account_id_foreign` (`account_id`),
KEY `life_events_contact_id_foreign` (`contact_id`),
KEY `life_events_life_event_type_id_foreign` (`life_event_type_id`),
KEY `life_events_reminder_id_foreign` (`reminder_id`),
CONSTRAINT `life_events_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `life_events_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
CONSTRAINT `life_events_life_event_type_id_foreign` FOREIGN KEY (`life_event_type_id`) REFERENCES `monica_life_event_types` (`id`) ON DELETE CASCADE,
CONSTRAINT `life_events_reminder_id_foreign` FOREIGN KEY (`reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_life_events`
--
LOCK TABLES `monica_life_events` WRITE;
/*!40000 ALTER TABLE `monica_life_events` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_life_events` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_messages`
--
DROP TABLE IF EXISTS `monica_messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_messages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`conversation_id` int(10) unsigned NOT NULL,
`content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`written_at` datetime NOT NULL,
`written_by_me` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `messages_conversation_id_foreign` (`conversation_id`),
KEY `messages_account_id_foreign` (`account_id`),
KEY `messages_contact_id_foreign` (`contact_id`),
CONSTRAINT `messages_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `messages_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE,
CONSTRAINT `messages_conversation_id_foreign` FOREIGN KEY (`conversation_id`) REFERENCES `monica_conversations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_messages`
--
LOCK TABLES `monica_messages` WRITE;
/*!40000 ALTER TABLE `monica_messages` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_messages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_metadata_love_relationships`
--
DROP TABLE IF EXISTS `monica_metadata_love_relationships`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_metadata_love_relationships` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`relationship_id` int(10) unsigned NOT NULL,
`is_active` tinyint(1) NOT NULL,
`notes` mediumtext COLLATE utf8mb4_unicode_ci,
`meet_date` datetime DEFAULT NULL,
`official_date` datetime DEFAULT NULL,
`breakup_date` datetime DEFAULT NULL,
`breakup_reason` mediumtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `metadata_love_relationships_account_id_foreign` (`account_id`),
KEY `metadata_love_relationships_relationship_id_foreign` (`relationship_id`),
CONSTRAINT `metadata_love_relationships_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `metadata_love_relationships_relationship_id_foreign` FOREIGN KEY (`relationship_id`) REFERENCES `monica_relationships` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_metadata_love_relationships`
--
LOCK TABLES `monica_metadata_love_relationships` WRITE;
/*!40000 ALTER TABLE `monica_metadata_love_relationships` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_metadata_love_relationships` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_migrations`
--
DROP TABLE IF EXISTS `monica_migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_migrations`
--
LOCK TABLES `monica_migrations` WRITE;
/*!40000 ALTER TABLE `monica_migrations` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_migrations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_modules`
--
DROP TABLE IF EXISTS `monica_modules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_modules` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`translation_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`delible` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_modules`
--
LOCK TABLES `monica_modules` WRITE;
/*!40000 ALTER TABLE `monica_modules` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_modules` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_notes`
--
DROP TABLE IF EXISTS `monica_notes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_notes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`body` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`is_favorited` tinyint(1) NOT NULL DEFAULT '0',
`favorited_at` date DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_notes`
--
LOCK TABLES `monica_notes` WRITE;
/*!40000 ALTER TABLE `monica_notes` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_notes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_notifications`
--
DROP TABLE IF EXISTS `monica_notifications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_notifications` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`reminder_id` int(11) DEFAULT NULL,
`delete_after_number_of_emails_sent` int(11) NOT NULL DEFAULT '0',
`number_of_emails_sent` int(11) NOT NULL DEFAULT '0',
`trigger_date` datetime NOT NULL,
`scheduled_number_days_before` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_notifications`
--
LOCK TABLES `monica_notifications` WRITE;
/*!40000 ALTER TABLE `monica_notifications` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_notifications` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_oauth_access_tokens`
--
DROP TABLE IF EXISTS `monica_oauth_access_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_oauth_access_tokens` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` int(11) DEFAULT NULL,
`client_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`scopes` text COLLATE utf8mb4_unicode_ci,
`revoked` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_access_tokens_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_oauth_access_tokens`
--
LOCK TABLES `monica_oauth_access_tokens` WRITE;
/*!40000 ALTER TABLE `monica_oauth_access_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_oauth_access_tokens` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_oauth_auth_codes`
--
DROP TABLE IF EXISTS `monica_oauth_auth_codes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_oauth_auth_codes` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` int(11) NOT NULL,
`client_id` int(10) unsigned NOT NULL,
`scopes` text COLLATE utf8mb4_unicode_ci,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_oauth_auth_codes`
--
LOCK TABLES `monica_oauth_auth_codes` WRITE;
/*!40000 ALTER TABLE `monica_oauth_auth_codes` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_oauth_auth_codes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_oauth_clients`
--
DROP TABLE IF EXISTS `monica_oauth_clients`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_oauth_clients` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,
`personal_access_client` tinyint(1) NOT NULL,
`password_client` tinyint(1) NOT NULL,
`revoked` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_clients_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_oauth_clients`
--
LOCK TABLES `monica_oauth_clients` WRITE;
/*!40000 ALTER TABLE `monica_oauth_clients` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_oauth_clients` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_oauth_personal_access_clients`
--
DROP TABLE IF EXISTS `monica_oauth_personal_access_clients`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_oauth_personal_access_clients` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`client_id` int(10) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_personal_access_clients_client_id_index` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_oauth_personal_access_clients`
--
LOCK TABLES `monica_oauth_personal_access_clients` WRITE;
/*!40000 ALTER TABLE `monica_oauth_personal_access_clients` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_oauth_personal_access_clients` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_oauth_refresh_tokens`
--
DROP TABLE IF EXISTS `monica_oauth_refresh_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_oauth_refresh_tokens` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_oauth_refresh_tokens`
--
LOCK TABLES `monica_oauth_refresh_tokens` WRITE;
/*!40000 ALTER TABLE `monica_oauth_refresh_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_oauth_refresh_tokens` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_occupations`
--
DROP TABLE IF EXISTS `monica_occupations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_occupations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`company_id` int(10) unsigned NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`salary` int(11) DEFAULT NULL,
`salary_unit` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`currently_works_here` tinyint(1) DEFAULT '0',
`start_date` date DEFAULT NULL,
`end_date` date DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `occupations_account_id_foreign` (`account_id`),
KEY `occupations_contact_id_foreign` (`contact_id`),
KEY `occupations_company_id_foreign` (`company_id`),
CONSTRAINT `occupations_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `occupations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `monica_companies` (`id`) ON DELETE CASCADE,
CONSTRAINT `occupations_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_occupations`
--
LOCK TABLES `monica_occupations` WRITE;
/*!40000 ALTER TABLE `monica_occupations` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_occupations` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_password_resets`
--
DROP TABLE IF EXISTS `monica_password_resets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY `password_resets_email_index` (`email`),
KEY `password_resets_token_index` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_password_resets`
--
LOCK TABLES `monica_password_resets` WRITE;
/*!40000 ALTER TABLE `monica_password_resets` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_password_resets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_pet_categories`
--
DROP TABLE IF EXISTS `monica_pet_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_pet_categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`is_common` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_pet_categories`
--
LOCK TABLES `monica_pet_categories` WRITE;
/*!40000 ALTER TABLE `monica_pet_categories` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_pet_categories` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_pets`
--
DROP TABLE IF EXISTS `monica_pets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_pets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`pet_category_id` int(11) NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_pets`
--
LOCK TABLES `monica_pets` WRITE;
/*!40000 ALTER TABLE `monica_pets` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_pets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_photos`
--
DROP TABLE IF EXISTS `monica_photos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_photos` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`original_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`new_filename` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`filesize` int(11) DEFAULT NULL,
`mime_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `photos_account_id_foreign` (`account_id`),
CONSTRAINT `photos_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_photos`
--
LOCK TABLES `monica_photos` WRITE;
/*!40000 ALTER TABLE `monica_photos` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_photos` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_places`
--
DROP TABLE IF EXISTS `monica_places`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_places` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`street` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`province` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`postal_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`country` char(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`latitude` double DEFAULT NULL,
`longitude` double DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `places_account_id_foreign` (`account_id`),
CONSTRAINT `places_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_places`
--
LOCK TABLES `monica_places` WRITE;
/*!40000 ALTER TABLE `monica_places` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_places` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_recovery_codes`
--
DROP TABLE IF EXISTS `monica_recovery_codes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_recovery_codes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`recovery` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`used` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `recovery_codes_account_id_foreign` (`account_id`),
KEY `recovery_codes_user_id_foreign` (`user_id`),
CONSTRAINT `recovery_codes_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `recovery_codes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_recovery_codes`
--
LOCK TABLES `monica_recovery_codes` WRITE;
/*!40000 ALTER TABLE `monica_recovery_codes` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_recovery_codes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_relationship_type_groups`
--
DROP TABLE IF EXISTS `monica_relationship_type_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_relationship_type_groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_relationship_type_groups`
--
LOCK TABLES `monica_relationship_type_groups` WRITE;
/*!40000 ALTER TABLE `monica_relationship_type_groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_relationship_type_groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_relationship_types`
--
DROP TABLE IF EXISTS `monica_relationship_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_relationship_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`name_reverse_relationship` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`relationship_type_group_id` int(11) NOT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_relationship_types`
--
LOCK TABLES `monica_relationship_types` WRITE;
/*!40000 ALTER TABLE `monica_relationship_types` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_relationship_types` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_relationships`
--
DROP TABLE IF EXISTS `monica_relationships`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_relationships` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`relationship_type_id` int(11) NOT NULL,
`contact_is` int(11) NOT NULL,
`relationship_type_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`of_contact` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_relationships`
--
LOCK TABLES `monica_relationships` WRITE;
/*!40000 ALTER TABLE `monica_relationships` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_relationships` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_reminder_outbox`
--
DROP TABLE IF EXISTS `monica_reminder_outbox`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_reminder_outbox` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`reminder_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`planned_date` date NOT NULL,
`nature` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'reminder',
`notification_number_days_before` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `reminder_outbox_account_id_foreign` (`account_id`),
KEY `reminder_outbox_reminder_id_foreign` (`reminder_id`),
KEY `reminder_outbox_user_id_foreign` (`user_id`),
CONSTRAINT `reminder_outbox_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `reminder_outbox_reminder_id_foreign` FOREIGN KEY (`reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE CASCADE,
CONSTRAINT `reminder_outbox_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_reminder_outbox`
--
LOCK TABLES `monica_reminder_outbox` WRITE;
/*!40000 ALTER TABLE `monica_reminder_outbox` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_reminder_outbox` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_reminder_rules`
--
DROP TABLE IF EXISTS `monica_reminder_rules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_reminder_rules` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`number_of_days_before` int(11) NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `reminder_rules_account_id_foreign` (`account_id`),
CONSTRAINT `reminder_rules_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_reminder_rules`
--
LOCK TABLES `monica_reminder_rules` WRITE;
/*!40000 ALTER TABLE `monica_reminder_rules` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_reminder_rules` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_reminder_sent`
--
DROP TABLE IF EXISTS `monica_reminder_sent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_reminder_sent` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`reminder_id` int(10) unsigned DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL,
`planned_date` date NOT NULL,
`sent_date` datetime NOT NULL,
`nature` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'reminder',
`frequency_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`frequency_number` int(11) DEFAULT NULL,
`html_content` longtext COLLATE utf8mb4_unicode_ci,
`text_content` longtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `reminder_sent_account_id_foreign` (`account_id`),
KEY `reminder_sent_reminder_id_foreign` (`reminder_id`),
KEY `reminder_sent_user_id_foreign` (`user_id`),
CONSTRAINT `reminder_sent_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `reminder_sent_reminder_id_foreign` FOREIGN KEY (`reminder_id`) REFERENCES `monica_reminders` (`id`) ON DELETE SET NULL,
CONSTRAINT `reminder_sent_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_reminder_sent`
--
LOCK TABLES `monica_reminder_sent` WRITE;
/*!40000 ALTER TABLE `monica_reminder_sent` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_reminder_sent` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_reminders`
--
DROP TABLE IF EXISTS `monica_reminders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_reminders` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`contact_id` int(10) unsigned NOT NULL,
`initial_date` date NOT NULL,
`title` mediumtext COLLATE utf8mb4_unicode_ci,
`description` longtext COLLATE utf8mb4_unicode_ci,
`frequency_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`frequency_number` int(11) DEFAULT NULL,
`delible` tinyint(1) NOT NULL DEFAULT '1',
`inactive` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `reminders_account_id_foreign` (`account_id`),
KEY `reminders_contact_id_foreign` (`contact_id`),
CONSTRAINT `reminders_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `reminders_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `monica_contacts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_reminders`
--
LOCK TABLES `monica_reminders` WRITE;
/*!40000 ALTER TABLE `monica_reminders` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_reminders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_sessions`
--
DROP TABLE IF EXISTS `monica_sessions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_sessions` (
`id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` int(11) DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_agent` text COLLATE utf8mb4_unicode_ci,
`payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
`last_activity` int(11) NOT NULL,
UNIQUE KEY `sessions_id_unique` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_sessions`
--
LOCK TABLES `monica_sessions` WRITE;
/*!40000 ALTER TABLE `monica_sessions` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_sessions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_special_dates`
--
DROP TABLE IF EXISTS `monica_special_dates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_special_dates` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_age_based` tinyint(1) NOT NULL DEFAULT '0',
`is_year_unknown` tinyint(1) NOT NULL DEFAULT '0',
`date` date NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `special_dates_account_id_uuid_index` (`account_id`,`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_special_dates`
--
LOCK TABLES `monica_special_dates` WRITE;
/*!40000 ALTER TABLE `monica_special_dates` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_special_dates` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_statistics`
--
DROP TABLE IF EXISTS `monica_statistics`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_statistics` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`number_of_users` int(11) NOT NULL,
`number_of_contacts` int(11) NOT NULL,
`number_of_notes` int(11) NOT NULL,
`number_of_oauth_access_tokens` int(11) NOT NULL,
`number_of_oauth_clients` int(11) NOT NULL,
`number_of_offsprings` int(11) NOT NULL,
`number_of_progenitors` int(11) NOT NULL,
`number_of_relationships` int(11) NOT NULL,
`number_of_subscriptions` int(11) NOT NULL,
`number_of_reminders` int(11) NOT NULL,
`number_of_tasks` int(11) NOT NULL,
`number_of_kids` int(11) NOT NULL,
`number_of_activities` int(11) NOT NULL,
`number_of_addresses` int(11) NOT NULL,
`number_of_api_calls` int(11) NOT NULL,
`number_of_calls` int(11) NOT NULL,
`number_of_contact_fields` int(11) NOT NULL,
`number_of_contact_field_types` int(11) NOT NULL,
`number_of_debts` int(11) NOT NULL,
`number_of_entries` int(11) NOT NULL,
`number_of_gifts` int(11) NOT NULL,
`number_of_invitations_sent` int(11) DEFAULT NULL,
`number_of_accounts_with_more_than_one_user` int(11) DEFAULT NULL,
`number_of_tags` int(11) DEFAULT NULL,
`number_of_import_jobs` int(11) DEFAULT NULL,
`number_of_conversations` int(11) DEFAULT NULL,
`number_of_messages` int(11) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_statistics`
--
LOCK TABLES `monica_statistics` WRITE;
/*!40000 ALTER TABLE `monica_statistics` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_statistics` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_subscriptions`
--
DROP TABLE IF EXISTS `monica_subscriptions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_subscriptions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`stripe_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`stripe_plan` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`quantity` int(11) NOT NULL,
`trial_ends_at` timestamp NULL DEFAULT NULL,
`ends_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_subscriptions`
--
LOCK TABLES `monica_subscriptions` WRITE;
/*!40000 ALTER TABLE `monica_subscriptions` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_subscriptions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_synctoken`
--
DROP TABLE IF EXISTS `monica_synctoken`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_synctoken` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'contacts',
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `synctoken_user_id_foreign` (`user_id`),
KEY `synctoken_account_id_user_id_name_index` (`account_id`,`user_id`,`name`),
CONSTRAINT `synctoken_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `synctoken_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_synctoken`
--
LOCK TABLES `monica_synctoken` WRITE;
/*!40000 ALTER TABLE `monica_synctoken` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_synctoken` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_tags`
--
DROP TABLE IF EXISTS `monica_tags`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_tags` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`name_slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` mediumtext COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_tags`
--
LOCK TABLES `monica_tags` WRITE;
/*!40000 ALTER TABLE `monica_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_tags` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_tasks`
--
DROP TABLE IF EXISTS `monica_tasks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_tasks` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`contact_id` int(10) unsigned DEFAULT NULL,
`uuid` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` longtext COLLATE utf8mb4_unicode_ci,
`completed` tinyint(1) NOT NULL DEFAULT '0',
`completed_at` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tasks_account_id_uuid_index` (`account_id`,`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_tasks`
--
LOCK TABLES `monica_tasks` WRITE;
/*!40000 ALTER TABLE `monica_tasks` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_tasks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_term_user`
--
DROP TABLE IF EXISTS `monica_term_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_term_user` (
`account_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`ip_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_term_user`
--
LOCK TABLES `monica_term_user` WRITE;
/*!40000 ALTER TABLE `monica_term_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_term_user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_terms`
--
DROP TABLE IF EXISTS `monica_terms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_terms` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`term_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`term_content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`privacy_version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`privacy_content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_terms`
--
LOCK TABLES `monica_terms` WRITE;
/*!40000 ALTER TABLE `monica_terms` DISABLE KEYS */;
INSERT 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);
/*!40000 ALTER TABLE `monica_terms` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_u2f_key`
--
DROP TABLE IF EXISTS `monica_u2f_key`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_u2f_key` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'key',
`user_id` int(10) unsigned NOT NULL,
`keyHandle` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`publicKey` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`certificate` text COLLATE utf8mb4_unicode_ci NOT NULL,
`counter` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `u2f_key_publickey_unique` (`publicKey`),
KEY `u2f_key_user_id_foreign` (`user_id`),
CONSTRAINT `u2f_key_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `monica_users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_u2f_key`
--
LOCK TABLES `monica_u2f_key` WRITE;
/*!40000 ALTER TABLE `monica_u2f_key` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_u2f_key` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_users`
--
DROP TABLE IF EXISTS `monica_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`admin` tinyint(1) NOT NULL DEFAULT '0',
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`google2fa_secret` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`account_id` int(11) NOT NULL,
`timezone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`currency_id` int(11) NOT NULL DEFAULT '2',
`locale` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
`metric` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fahrenheit',
`fluid_container` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'false',
`contacts_sort_order` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'firstnameAZ',
`name_order` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'firstname_lastname_nickname',
`invited_by_user_id` int(11) DEFAULT NULL,
`dashboard_active_tab` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'calls',
`gifts_active_tab` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ideas',
`profile_active_tab` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'notes',
`profile_new_life_event_badge_seen` tinyint(1) NOT NULL DEFAULT '0',
`temperature_scale` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT 'celsius',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_users`
--
LOCK TABLES `monica_users` WRITE;
/*!40000 ALTER TABLE `monica_users` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `monica_weather`
--
DROP TABLE IF EXISTS `monica_weather`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `monica_weather` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) unsigned NOT NULL,
`place_id` int(10) unsigned NOT NULL,
`weather_json` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `weather_account_id_foreign` (`account_id`),
KEY `weather_place_id_foreign` (`place_id`),
CONSTRAINT `weather_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `monica_accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `weather_place_id_foreign` FOREIGN KEY (`place_id`) REFERENCES `monica_places` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `monica_weather`
--
LOCK TABLES `monica_weather` WRITE;
/*!40000 ALTER TABLE `monica_weather` DISABLE KEYS */;
/*!40000 ALTER TABLE `monica_weather` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-02-20 16:07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment