-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `photogram_rb`
--

-- --------------------------------------------------------

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `id` int UNSIGNED NOT NULL,
  `username` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `password` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_access` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_last_active` datetime DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `username`, `password`, `meta_access`, `meta_last_active`, `stamp_registration`, `stamp_last_update`) VALUES
(1, 'admin', '$2y$10$rK1UoIO1AP.atLw7RzGh/eHq1JhWDBMV6Ex8RkJaqYkC7WGqEjdAm', '$2y$10$K4TolRQ3jC6a8sGE3QG6qu1yTBFvvIvfLumKh4pfWwaUkomkZH6I2', '2022-03-24 08:48:50', '2022-03-24 07:14:56', '2022-03-24 08:48:50');

-- --------------------------------------------------------

--
-- Table structure for table `collection`
--

CREATE TABLE `collection` (
  `id` int UNSIGNED NOT NULL,
  `owner_user_id` int UNSIGNED DEFAULT NULL,
  `display_title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `display_image` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `hashtag`
--

CREATE TABLE `hashtag` (
  `id` int UNSIGNED NOT NULL,
  `display_text` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `cache_posts_count` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `hashtagfollow`
--

CREATE TABLE `hashtagfollow` (
  `id` int UNSIGNED NOT NULL,
  `followed_hashtag_id` int UNSIGNED DEFAULT NULL,
  `followed_by_user_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `hashtagpost`
--

CREATE TABLE `hashtagpost` (
  `id` int UNSIGNED NOT NULL,
  `hashtag_id` int UNSIGNED DEFAULT NULL,
  `post_id` int UNSIGNED DEFAULT NULL,
  `post_owner_user_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `notification`
--

CREATE TABLE `notification` (
  `id` int UNSIGNED NOT NULL,
  `to_user_id` int UNSIGNED DEFAULT NULL,
  `target_content_id` int UNSIGNED DEFAULT NULL,
  `linked_content` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_is_read` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_is_transient` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration_date` date DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `post`
--

CREATE TABLE `post` (
  `id` int UNSIGNED NOT NULL,
  `owner_user_id` int UNSIGNED DEFAULT NULL,
  `display_caption` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
  `display_location` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `display_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
  `meta_hashtags` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `cache_likes_count` int UNSIGNED DEFAULT NULL,
  `cache_comments_count` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `postcomment`
--

CREATE TABLE `postcomment` (
  `id` int UNSIGNED NOT NULL,
  `owner_user_id` int UNSIGNED DEFAULT NULL,
  `parent_post_id` int UNSIGNED DEFAULT NULL,
  `reply_to_postcomment_id` int UNSIGNED DEFAULT NULL,
  `display_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci,
  `cache_likes_count` tinyint UNSIGNED DEFAULT NULL,
  `cache_comments_count` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `postcommentlike`
--

CREATE TABLE `postcommentlike` (
  `id` int UNSIGNED NOT NULL,
  `liked_by_user_id` int UNSIGNED DEFAULT NULL,
  `liked_postcomment_id` int UNSIGNED DEFAULT NULL,
  `parent_post_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `postlike`
--

CREATE TABLE `postlike` (
  `id` int UNSIGNED NOT NULL,
  `liked_post_id` int UNSIGNED DEFAULT NULL,
  `liked_by_user_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `postsave`
--

CREATE TABLE `postsave` (
  `id` int UNSIGNED NOT NULL,
  `saved_post_id` int UNSIGNED DEFAULT NULL,
  `saved_by_user_id` int UNSIGNED DEFAULT NULL,
  `saved_to_collection_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `postusertag`
--

CREATE TABLE `postusertag` (
  `id` int UNSIGNED NOT NULL,
  `tagged_user_id` int UNSIGNED DEFAULT NULL,
  `tagged_in_post_id` int UNSIGNED DEFAULT NULL,
  `post_owner_user_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `setting`
--

CREATE TABLE `setting` (
  `id` int UNSIGNED NOT NULL,
  `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `value` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `setting`
--

INSERT INTO `setting` (`id`, `key`, `value`, `stamp_registration`, `stamp_last_update`) VALUES
(1, 'setting_none', 'none', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(2, 'setting_max_len_user_username', '50', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(3, 'setting_min_len_user_username', '6', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(4, 'setting_max_len_user_email', '250', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(5, 'setting_min_len_user_email', '6', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(6, 'setting_max_len_user_password', '100', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(7, 'setting_min_len_user_password', '6', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(8, 'setting_max_len_user_display_name', '100', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(9, 'setting_min_len_user_display_name', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(10, 'setting_max_len_user_display_bio', '100', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(11, 'setting_min_len_user_display_bio', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(12, 'setting_max_len_user_display_web', '100', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(13, 'setting_min_len_user_display_web', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(14, 'setting_max_user_display_image_file_size', '10', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(15, 'setting_supported_user_display_image_file_format', 'png, jpg, jpeg, webp', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(16, 'setting_max_len_post_display_caption', '3000', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(17, 'setting_min_len_post_display_caption', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(18, 'setting_max_len_post_display_location', '100', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(19, 'setting_min_len_post_display_location', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(20, 'setting_max_post_display_content_item', '12', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(21, 'setting_min_post_display_content_item', '1', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(22, 'setting_max_post_hashtag', '8', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(23, 'setting_min_post_hashtag', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(24, 'setting_max_len_post_hashtag', '35', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(25, 'setting_min_len_post_hashtag', '3', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(26, 'setting_max_post_user_tag_per_item', '8', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(27, 'setting_min_post_user_tag_per_item', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(28, 'setting_max_post_user_tag_total', '40', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(29, 'setting_min_post_user_tag_total', '0', '2022-03-24 07:54:30', '2022-03-24 07:54:30'),
(30, 'setting_max_post_display_content_item_file_size', '5', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(31, 'setting_supported_post_display_content_item_file_format', 'png, jpg, jpeg, webp', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(32, 'setting_max_len_post_comment_display_text', '1500', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(33, 'setting_min_len_post_comment_display_text', '1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(34, 'setting_max_len_collection_display_title', '50', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(35, 'setting_min_len_collection_display_title', '1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(36, 'ss_text_name', 'Photogram', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(37, 'ss_text_minimum_api_version', '0.1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(38, 'ss_text_api_update_message', 'Whoa! you are missing plenty of new features. Update your app.', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(39, 'ss_text_api_ios_update_url', 'https://address.to.update.for.ios.devices', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(40, 'ss_text_api_android_update_url', 'https://address.to.update.for.android.devices', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(41, 'ss_int_otp_lifetime_in_hours', '2', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(42, 'ss_int_otp_lifetime_in_tries', '5', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(43, 'ss_text_mailer_contact_email', 'contact@yoursite.com', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(44, 'ss_text_mailer_no_reply_email', 'noreply@yoursite.com', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(45, 'ss_bool_mailer_smtp', '1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(46, 'ss_text_mailer_smtp_host', 'smtp.gmail.com', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(47, 'ss_int_mailer_smtp_port', '465', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(48, 'ss_text_mailer_smtp_username', 'email@gmail.com', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(49, 'ss_text_mailer_smtp_password', 'gmails acc password', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(50, 'ss_text_email_header', '#e1e1e1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(51, 'ss_text_email_footer', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(52, 'ss_text_path_uploads', '/var/www/html/photogram//uploads/', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(53, 'ss_text_file_name_placeholder_user', 'user.png', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(54, 'ss_text_file_name_placeholder_post', 'post.png', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(55, 'ss_text_file_name_placeholder_collection', 'collection.png', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(56, 'ss_bool_implicit_hashtag_follow_on_post_like', '1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(57, 'ss_bool_implicit_hashtag_follow_on_post_comment', '1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(58, 'ss_bool_implicit_hashtag_follow_on_post_comment_reply', '1', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(59, 'ss_int_limit_load_collection', '6', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(60, 'ss_int_limit_load_user_follow', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(61, 'ss_int_limit_load_user_follow_pending', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(62, 'ss_int_limit_load_user_block', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(63, 'ss_int_limit_load_hashtag_post', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(64, 'ss_int_limit_load_hashtag_post_explore', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(65, 'ss_int_limit_load_post_comment_like', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(66, 'ss_int_limit_load_post_comment', '3', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(67, 'ss_int_limit_load_post_like', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(68, 'ss_int_limit_load_post_save', '6', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(69, 'ss_int_limit_load_post_user_tag', '6', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(70, 'ss_int_limit_load_post_news_feeds', '6', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(71, 'ss_int_limit_load_post_profile', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(72, 'ss_int_limit_load_user_search', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(73, 'ss_int_limit_load_notification', '9', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(74, 'ss_int_limit_load_post_infinite', '12', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(75, 'ss_bool_user_email_verification', '0', '2022-03-24 07:54:31', '2022-03-24 08:48:50'),
(76, 'ss_enum_user_default_account_privacy', 'no', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(77, 'ss_enum_notification_pause_all', 'off', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(78, 'ss_enum_notification_likes', 'from_everyone', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(79, 'ss_enum_notification_comments', 'from_everyone', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(80, 'ss_enum_notification_photos_of_you', 'from_everyone', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(81, 'ss_enum_notification_likes_on_photos_of_you', 'on', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(82, 'ss_enum_notification_comments_on_photos_of_you', 'on', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(83, 'ss_enum_notification_comment_likes_and_pins', 'on', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(84, 'ss_enum_notification_accepted_follow_request', 'on', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),

-- added in v1.1.0

(85, 'ss_int_compress_user_display_image_file_res', '150', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(86, 'ss_int_compress_post_display_image_file_res', '400', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(87, 'ss_int_compress_collection_cover_image_file_res', '200', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),

(88, 'ss_int_compress_user_display_image_file_quality', '90', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(89, 'ss_int_compress_post_display_image_file_quality', '90', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(90, 'ss_int_compress_collection_cover_image_file_quality', '70', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),

(91, 'ss_enum_storage_disk_user_images', 'local', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(92, 'ss_enum_storage_disk_post_images', 'local', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(93, 'ss_enum_storage_disk_collection_images', 'local', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),

(94, 'ss_text_aws_s3_key', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(95, 'ss_text_aws_s3_secret', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(96, 'ss_text_aws_s3_bucket', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(97, 'ss_text_aws_s3_region', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(98, 'ss_text_azure_blob_dsn', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(99, 'ss_text_azure_blob_container', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(100, 'ss_text_wasabi_s3_key', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(101, 'ss_text_wasabi_s3_secret', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(102, 'ss_text_wasabi_s3_bucket', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31'),
(103, 'ss_text_wasabi_s3_region', '', '2022-03-24 07:54:31', '2022-03-24 07:54:31');

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `id` int UNSIGNED NOT NULL,
  `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `username` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `password` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `display_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `display_image` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `display_bio` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `display_web` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_access` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_is_private` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_is_email_verified` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_last_active` datetime DEFAULT NULL,
  `meta_push_settings` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `cache_posts_count` int UNSIGNED DEFAULT NULL,
  `cache_followers_count` int UNSIGNED DEFAULT NULL,
  `cache_followings_count` int UNSIGNED DEFAULT NULL,
  `cache_blocked_user_ids` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `userblock`
--

CREATE TABLE `userblock` (
  `id` int UNSIGNED NOT NULL,
  `blocked_user_id` int UNSIGNED DEFAULT NULL,
  `blocked_by_user_id` int UNSIGNED DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `useremailverification`
--

CREATE TABLE `useremailverification` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `meta_access_otp` int UNSIGNED DEFAULT NULL,
  `meta_times_failed` tinyint UNSIGNED DEFAULT NULL,
  `meta_is_expired` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `userfollow`
--

CREATE TABLE `userfollow` (
  `id` int UNSIGNED NOT NULL,
  `followed_user_id` int UNSIGNED DEFAULT NULL,
  `followed_by_user_id` int UNSIGNED DEFAULT NULL,
  `meta_is_pending` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- --------------------------------------------------------

--
-- Table structure for table `userrecovery`
--

CREATE TABLE `userrecovery` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `meta_access_otp` int UNSIGNED DEFAULT NULL,
  `meta_access_token` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_times_failed` tinyint UNSIGNED DEFAULT NULL,
  `meta_is_expired` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `stamp_registration` datetime DEFAULT NULL,
  `stamp_last_update` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `collection`
--
ALTER TABLE `collection`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_collection_owner_user` (`owner_user_id`);

--
-- Indexes for table `hashtag`
--
ALTER TABLE `hashtag`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hashtagfollow`
--
ALTER TABLE `hashtagfollow`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_hashtagfollow_followed_hashtag` (`followed_hashtag_id`),
  ADD KEY `index_foreignkey_hashtagfollow_followed_by_user` (`followed_by_user_id`);

--
-- Indexes for table `hashtagpost`
--
ALTER TABLE `hashtagpost`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_hashtagpost_hashtag` (`hashtag_id`),
  ADD KEY `index_foreignkey_hashtagpost_post` (`post_id`),
  ADD KEY `index_foreignkey_hashtagpost_post_owner_user` (`post_owner_user_id`);

--
-- Indexes for table `notification`
--
ALTER TABLE `notification`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_notification_to_user` (`to_user_id`),
  ADD KEY `index_foreignkey_notification_target_content` (`target_content_id`);

--
-- Indexes for table `post`
--
ALTER TABLE `post`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_post_owner_user` (`owner_user_id`);

--
-- Indexes for table `postcomment`
--
ALTER TABLE `postcomment`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_postcomment_owner_user` (`owner_user_id`),
  ADD KEY `index_foreignkey_postcomment_parent_post` (`parent_post_id`),
  ADD KEY `index_foreignkey_postcomment_reply_to_postcomment` (`reply_to_postcomment_id`);

--
-- Indexes for table `postcommentlike`
--
ALTER TABLE `postcommentlike`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_postcommentlike_liked_by_user` (`liked_by_user_id`),
  ADD KEY `index_foreignkey_postcommentlike_liked_postcomment` (`liked_postcomment_id`),
  ADD KEY `index_foreignkey_postcommentlike_parent_post` (`parent_post_id`);

--
-- Indexes for table `postlike`
--
ALTER TABLE `postlike`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_postlike_liked_post` (`liked_post_id`),
  ADD KEY `index_foreignkey_postlike_liked_by_user` (`liked_by_user_id`);

--
-- Indexes for table `postsave`
--
ALTER TABLE `postsave`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_postsave_saved_post` (`saved_post_id`),
  ADD KEY `index_foreignkey_postsave_saved_by_user` (`saved_by_user_id`),
  ADD KEY `index_foreignkey_postsave_saved_to_collection` (`saved_to_collection_id`);

--
-- Indexes for table `postusertag`
--
ALTER TABLE `postusertag`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_postusertag_tagged_user` (`tagged_user_id`),
  ADD KEY `index_foreignkey_postusertag_tagged_in_post` (`tagged_in_post_id`),
  ADD KEY `index_foreignkey_postusertag_post_owner_user` (`post_owner_user_id`);

--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `userblock`
--
ALTER TABLE `userblock`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_userblock_blocked_user` (`blocked_user_id`),
  ADD KEY `index_foreignkey_userblock_blocked_by_user` (`blocked_by_user_id`);

--
-- Indexes for table `useremailverification`
--
ALTER TABLE `useremailverification`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_useremailverification_user` (`user_id`);

--
-- Indexes for table `userfollow`
--
ALTER TABLE `userfollow`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_userfollow_followed_user` (`followed_user_id`),
  ADD KEY `index_foreignkey_userfollow_followed_by_user` (`followed_by_user_id`);

--
-- Indexes for table `userrecovery`
--
ALTER TABLE `userrecovery`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_foreignkey_userrecovery_user` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `collection`
--
ALTER TABLE `collection`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `hashtag`
--
ALTER TABLE `hashtag`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `hashtagfollow`
--
ALTER TABLE `hashtagfollow`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `hashtagpost`
--
ALTER TABLE `hashtagpost`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notification`
--
ALTER TABLE `notification`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `post`
--
ALTER TABLE `post`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `postcomment`
--
ALTER TABLE `postcomment`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `postcommentlike`
--
ALTER TABLE `postcommentlike`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `postlike`
--
ALTER TABLE `postlike`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `postsave`
--
ALTER TABLE `postsave`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `postusertag`
--
ALTER TABLE `postusertag`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `setting`
--
ALTER TABLE `setting`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `userblock`
--
ALTER TABLE `userblock`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `useremailverification`
--
ALTER TABLE `useremailverification`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `userfollow`
--
ALTER TABLE `userfollow`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `userrecovery`
--
ALTER TABLE `userrecovery`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

