-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : sam. 08 fév. 2025 à 10:00
-- Version du serveur : 10.4.32-MariaDB
-- Version de PHP : 8.2.12

START TRANSACTION;



--
-- Base de données : `realflausite_db`
--

DELIMITER $$
--
-- Procédures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_get_discussions` (IN `user_id` INT)   BEGIN
    SELECT MAX(M.id) AS mid, M.message_creator as message_creator, MR.receiver_id as message_receiver, M.create_date as message_date, MR.is_read as is_read 
    FROM message AS M
    INNER JOIN message_recipient AS MR ON M.id = MR.message_id
    WHERE M.message_creator = user_id OR MR.receiver_id = user_id
    GROUP BY M.message_creator, MR.receiver_id
    ORDER BY mid DESC;  -- Ensure this line ends with a semicolon
END$$

DELIMITER ;

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

--
-- Structure de la table `channel`
--

CREATE TABLE `channel` (
  `id` int(11) NOT NULL,
  `sender` int(11) DEFAULT NULL,
  `receiver` int(11) DEFAULT NULL,
  `group_recipient_id` int(11) DEFAULT NULL,
  `message_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `channel`
--

INSERT INTO `channel` (`id`, `sender`, `receiver`, `group_recipient_id`, `message_id`) VALUES
(166, 6, 1, NULL, 166),
(167, 6, 1, NULL, 167),
(168, 6, 1, NULL, 168),
(169, 6, 1, NULL, 169),
(170, 6, 1, NULL, 170),
(171, 6, 1, NULL, 171),
(172, 6, 1, NULL, 172),
(173, 6, 1, NULL, 173),
(174, 6, 1, NULL, 174),
(175, 6, 1, NULL, 175),
(176, 6, 1, NULL, 176),
(177, 6, 1, NULL, 177),
(178, 6, 1, NULL, 178),
(179, 6, 1, NULL, 179),
(180, 6, 1, NULL, 180),
(181, 6, 1, NULL, 181),
(182, 6, 1, NULL, 182),
(183, 6, 1, NULL, 183),
(184, 6, 1, NULL, 184),
(189, 1, 3, NULL, 189),
(190, 1, 3, NULL, 190),
(192, 1, 3, NULL, 192),
(193, 1, 3, NULL, 193),
(200, 1, 3, NULL, 200);

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

--
-- Structure de la table `cinema_chat`
--

CREATE TABLE `cinema_chat` (
  `id` int(11) NOT NULL,
  `schedule_id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `message` text NOT NULL,
  `timestamp` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `cinema_chat`
--

INSERT INTO `cinema_chat` (`id`, `schedule_id`, `user_id`, `message`, `timestamp`) VALUES
(1, 5, 1, 'how far na guy', '2025-01-26 15:32:36'),
(2, 5, 1, 'Hello, this is a test message', '2025-01-26 15:42:27'),
(3, 8, 1, 'Hello, this is a test message', '2025-01-26 16:10:38'),
(4, 9, 2, 'Hello, this is a test message', '2025-01-26 16:12:16'),
(5, 10, 2, 'Thanks ', '2025-01-26 16:17:50'),
(6, 10, 2, 'wait ', '2025-01-26 16:18:09'),
(7, 10, 2, 'how far ', '2025-01-26 16:20:11'),
(8, 10, 2, 'yo bro ', '2025-01-26 16:25:13'),
(9, 18, 2, 'wow ', '2025-01-26 17:08:20'),
(10, 16, 2, 'I like that ', '2025-01-26 17:08:29'),
(11, 19, 2, 'hmmm', '2025-01-26 17:08:54'),
(12, 19, 4, 'what\'s up ', '2025-01-26 17:11:40'),
(13, 19, 4, 'I really like this ', '2025-01-26 17:11:52'),
(14, 19, 4, 'yo bro', '2025-01-26 17:13:54'),
(15, 19, 4, 'how far ', '2025-01-26 17:14:02'),
(16, 19, 4, 'hello', '2025-01-26 17:14:11'),
(17, 16, 2, 'how far ', '2025-01-26 17:27:52'),
(18, 19, 4, 'So seems the video hast yet started ?', '2025-01-26 19:23:20'),
(19, 21, 4, 'hello ', '2025-01-27 07:08:23'),
(20, 21, 4, 'I wanted to find out ', '2025-01-27 07:08:31'),
(21, 24, 4, 'when I would see my ghetto life fade away ', '2025-01-27 16:27:12'),
(22, 25, 4, 'be like you want to watch the movie on your own ', '2025-01-29 08:54:28'),
(23, 25, 4, 'so stop doing that then ', '2025-01-29 08:54:40'),
(24, 25, 2, 'hey sup bro ', '2025-01-29 08:55:30'),
(25, 25, 2, 'we was late ', '2025-01-29 08:55:40'),
(26, 25, 2, 'I didn\'t expect that ', '2025-01-29 08:56:06'),
(27, 28, 4, 'yo', '2025-02-06 14:30:43');

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

--
-- Structure de la table `comment`
--

CREATE TABLE `comment` (
  `id` int(11) NOT NULL,
  `comment_owner` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `comment_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `comment_edit_date` timestamp NULL DEFAULT NULL,
  `comment_text` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `comment`
--

INSERT INTO `comment` (`id`, `comment_owner`, `post_id`, `comment_date`, `comment_edit_date`, `comment_text`) VALUES
(10, 4, 26, '2025-01-28 06:32:22', NULL, 'yo'),
(11, 4, 26, '2025-01-28 06:37:54', NULL, 'what l'),
(12, 4, 26, '2025-01-28 06:38:01', NULL, 'yooebd f'),
(13, 4, 26, '2025-01-28 06:38:06', NULL, 'bfjdjejdj'),
(14, 4, 26, '2025-01-28 06:38:10', NULL, 'x xbwbdbd'),
(15, 4, 24, '2025-01-28 06:48:53', NULL, 'yo'),
(16, 4, 24, '2025-01-28 06:48:58', NULL, 'chyy7'),
(17, 4, 24, '2025-01-28 06:49:08', NULL, 'yoo'),
(18, 4, 24, '2025-01-28 06:49:18', NULL, 'hmm'),
(19, 4, 2, '2025-01-28 19:41:13', NULL, 'yo'),
(20, 4, 7, '2025-02-04 08:46:45', NULL, 'That&#039;s not it'),
(21, 4, 7, '2025-02-04 08:47:00', NULL, 'I don&#039;t really like this'),
(22, 4, 7, '2025-02-04 08:47:12', NULL, 'clear all comments');

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

--
-- Structure de la table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `user_id` int(20) DEFAULT NULL,
  `video_id` int(11) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `comment_type` enum('public','private') DEFAULT NULL,
  `timestamp` datetime DEFAULT current_timestamp(),
  `encrypted_comment` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `comments`
--

INSERT INTO `comments` (`id`, `user_id`, `video_id`, `comment`, `comment_type`, `timestamp`, `encrypted_comment`) VALUES
(75, 4, 9, 'that\'s your point of view ', '', '2025-01-26 11:42:25', NULL),
(76, 4, 9, 'I don\'t like this ', '', '2025-01-27 07:46:30', NULL),
(77, 4, 9, 'oh my God ', '', '2025-01-27 23:33:55', NULL),
(78, 4, 9, 'this is crazy', '', '2025-02-02 11:14:34', NULL);

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

--
-- Structure de la table `contacts`
--

CREATE TABLE `contacts` (
  `id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `contact_id` bigint(20) NOT NULL,
  `contact_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `contacts`
--

INSERT INTO `contacts` (`id`, `user_id`, `contact_id`, `contact_name`) VALUES
(3, 512404871496927, 1442771, 'sdfsdf'),
(4, 1442771, 512404871496927, 'dsf'),
(5, 1442771, 385792354341325, 'comfort'),
(6, 512404871496927, 385792354341325, 'E');

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

--
-- Structure de la table `dislikes`
--

CREATE TABLE `dislikes` (
  `id` int(11) NOT NULL,
  `video_id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `dislikes`
--

INSERT INTO `dislikes` (`id`, `video_id`, `user_id`, `created_at`) VALUES
(40, 29, 385792354341325, '2024-08-08 08:48:16'),
(126, 25, 385792354341325, '2024-09-08 00:01:32'),
(135, 26, 512404871496927, '2024-09-12 21:28:33'),
(163, 38, 1442771, '2024-09-21 00:26:05');

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

--
-- Structure de la table `invitations`
--

CREATE TABLE `invitations` (
  `id` int(11) NOT NULL,
  `friend_id` int(11) NOT NULL,
  `video_url` varchar(255) NOT NULL,
  `schedule_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Structure de la table `like`
--

CREATE TABLE `like` (
  `id` int(11) NOT NULL,
  `post_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `like_date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `like`
--

INSERT INTO `like` (`id`, `post_id`, `user_id`, `like_date`) VALUES
(7, 2, 4, '2025-01-28 19:10:38'),
(8, 4, 4, '2025-02-04 14:50:41');

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

--
-- Structure de la table `likes`
--

CREATE TABLE `likes` (
  `id` int(11) NOT NULL,
  `video_id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `likes`
--

INSERT INTO `likes` (`id`, `video_id`, `user_id`, `created_at`) VALUES
(2, 11, 4, '2025-02-03 10:21:27'),
(6, 19, 4, '2025-02-07 13:23:51');

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

--
-- Structure de la table `message`
--

CREATE TABLE `message` (
  `id` int(11) NOT NULL,
  `message_creator` int(11) DEFAULT NULL,
  `message` text DEFAULT NULL,
  `create_date` datetime NOT NULL DEFAULT current_timestamp(),
  `is_reply` int(11) DEFAULT NULL,
  `reply_to` int(11) DEFAULT NULL,
  `edited` tinyint(1) DEFAULT 0,
  `media_uri` varchar(255) DEFAULT NULL,
  `media_type` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `message`
--

INSERT INTO `message` (`id`, `message_creator`, `message`, `create_date`, `is_reply`, `reply_to`, `edited`, `media_uri`, `media_type`) VALUES
(157, 3, 'Updated message content', '2024-09-27 19:56:27', NULL, NULL, 1, NULL, NULL),
(158, 1, 'thanks, same to you bro', '2024-09-27 19:56:49', NULL, NULL, 0, NULL, NULL),
(159, 3, 'since when are you on Flausite', '2024-09-27 19:57:20', 1, 158, 0, NULL, NULL),
(160, 1, 'i have been on Flausite for the past 3 days now , and you ?', '2024-09-27 19:58:08', NULL, NULL, 0, NULL, NULL),
(161, 3, 'man i just signup!', '2024-09-27 19:58:30', NULL, NULL, 0, NULL, NULL),
(162, 3, 'fuck in over took say', '2024-09-27 20:17:03', NULL, NULL, 0, NULL, NULL),
(163, 1, 'i dont know why this shit got me lazy right now eh', '2024-09-27 20:17:30', NULL, NULL, 0, NULL, NULL),
(174, 6, 'fdgfdgd', '2024-09-28 12:44:40', NULL, NULL, 0, NULL, NULL),
(175, 6, '', '2024-09-28 12:44:42', NULL, NULL, 0, NULL, NULL),
(176, 6, '', '2024-09-28 12:44:45', NULL, NULL, 0, NULL, NULL),
(178, 6, '', '2024-09-28 12:44:47', NULL, NULL, 0, NULL, NULL),
(180, 6, '', '2024-09-28 12:45:19', NULL, NULL, 0, NULL, NULL),
(182, 6, 'hhhhh', '2024-09-28 12:45:28', NULL, NULL, 0, NULL, NULL),
(183, 6, 'hello bro,sdfdsafljdslfjskldfjsdlkfjsdlafjksdlkfjsdlfjsdlfjsdflksdjfskdlfjfkl;jsdafkl;jasdfkljasdfkljsdaflkasjdfl;kasdjflkasfjaskl;fjasdfkljsdlfjasdfkljasdflkasjdfsdjflksdfjlsdfjsdlkfjsdafkljsdfkosdjfklsdfjskdlfjasdkfjsdlfjsdfklsdfljasdfklasjdfklsdjfsdfkjasdfkasdfkljasdlkfjsdfljsdlfksdjlskdfjskdljfklfjasdlfjsdiofsdfjvmvasdmfeklfsdfjosidfjsdfksdfjlksdfjskdlfjsdfiosdfiojsdfksdfksdfsdfsd', '2024-09-28 12:46:07', NULL, NULL, 0, NULL, NULL),
(184, 6, 'fklajsdlkfsdjlfkjsdlfksjdflksjdflsjdlfjsdflsjdflksdjflksdjflfjasdlfjkasdlfkasklfjlkfskdlfjskdlfjsdklfjsdfkljsdflksjdlfkjsdfkljdfkljsdfkljsdfljsdfklsdjlkjdflksjdflksjdflksdfjklsdfjskdlfjsdlfjsdfkljdflkjsdflksdfjlskdfjsdlfjsdfklsdfjasdaflkjsdfsdlkfjasdflksjdfsdlkjsdflksddfjsdlfjsdflkasdflksdfjsdflkjflksjdflkfjdklsdfjskdl fjs xkcjzxcasdkfjdfjklsdfklsdfkljsdflksdjsdfjklsdfklsjdfklsdzxkcjcwdiosdklsdccljsdfklsdfsjdfskdlflsdjfjlsdfsa', '2024-09-28 12:46:46', NULL, NULL, 0, NULL, NULL),
(185, 1, 'whatsup', '2024-09-30 00:35:41', NULL, NULL, 0, NULL, NULL),
(186, 1, 'whatsup main', '2024-09-30 00:35:50', NULL, NULL, 0, NULL, NULL),
(187, 1, 'i think i like you', '2024-09-30 00:36:00', NULL, NULL, 0, NULL, NULL),
(188, 1, 'whatsup bro', '2024-09-30 00:36:06', NULL, NULL, 0, NULL, NULL),
(189, 1, 'shut the fuck up', '2024-09-30 00:36:17', NULL, NULL, 0, NULL, NULL),
(190, 1, 'bro get out', '2024-09-30 00:36:30', NULL, NULL, 0, NULL, NULL),
(191, 1, 'yo yo yo', '2024-09-30 00:37:40', NULL, NULL, 0, NULL, NULL),
(192, 1, 'yo yo yo', '2024-09-30 00:37:40', NULL, NULL, 0, NULL, NULL),
(193, 1, 'whatsup', '2024-09-30 00:38:03', NULL, NULL, 0, NULL, NULL),
(194, 9, 'hello bro how far', '2024-09-30 17:44:30', NULL, NULL, 0, NULL, NULL),
(195, 1, 'mince , chatting on flausite, be like the best eh', '2024-09-30 17:44:46', NULL, NULL, 0, NULL, NULL),
(196, 9, 'hey how far', '2024-09-30 17:45:29', NULL, NULL, 0, NULL, NULL),
(197, 9, 'how far bros', '2024-09-30 17:45:49', NULL, NULL, 0, NULL, NULL),
(198, 9, 'its Vitera', '2024-09-30 17:46:05', NULL, NULL, 0, NULL, NULL),
(199, 9, 'I know right bro?', '2024-10-02 00:50:29', NULL, NULL, 0, NULL, NULL),
(200, 1, 'hgfh', '2024-10-07 17:16:18', NULL, NULL, 0, NULL, NULL),
(201, 1, 'hgfh', '2024-10-07 17:16:18', NULL, NULL, 0, NULL, NULL),
(202, 2, 'how far ', '2025-01-26 11:40:58', 0, NULL, 0, NULL, NULL),
(203, 2, 'I don\'t think you\'ll like this ', '2025-01-26 11:41:06', 0, NULL, 0, NULL, NULL),
(204, 2, 'who is this ', '2025-01-26 11:41:20', 0, NULL, 0, NULL, NULL),
(205, 4, 'how far ', '2025-01-26 13:03:04', 0, NULL, 0, NULL, NULL),
(206, 4, '😀🥰', '2025-01-26 22:23:22', 0, NULL, 0, NULL, NULL),
(207, 4, 'this isn\'t cool at all ', '2025-01-26 23:16:52', 0, NULL, 0, NULL, NULL),
(208, 4, 'yo sup ', '2025-01-26 23:21:15', 0, NULL, 0, NULL, NULL),
(209, 4, 'how far ', '2025-01-26 23:21:21', 0, NULL, 0, NULL, NULL),
(210, 4, 'this is it ', '2025-01-26 23:21:39', 0, NULL, 0, NULL, NULL),
(211, 4, 'yussuf', '2025-01-27 16:49:58', 0, NULL, 0, NULL, NULL),
(212, 4, 'yo', '2025-01-27 16:50:02', 0, NULL, 0, NULL, NULL),
(213, 4, 'how ', '2025-01-27 16:50:05', 0, NULL, 0, NULL, NULL),
(214, 4, 'hello ', '2025-01-27 16:50:09', 0, NULL, 0, NULL, NULL),
(215, 4, 'always against me ', '2025-01-27 16:50:15', 0, NULL, 0, NULL, NULL),
(216, 4, 'hmmm ', '2025-01-27 16:50:20', 0, NULL, 0, NULL, NULL),
(217, 4, 'hello', '2025-01-27 16:50:23', 0, NULL, 0, NULL, NULL),
(218, 4, 'hey', '2025-01-27 16:50:28', 0, NULL, 0, NULL, NULL),
(219, 4, 'fjdjej', '2025-01-27 16:50:33', 0, NULL, 0, NULL, NULL),
(220, 2, 'is it Easy ? ', '2025-01-27 16:50:58', 0, NULL, 0, NULL, NULL),
(221, 2, 'always against me ', '2025-01-27 16:51:05', 0, NULL, 0, NULL, NULL),
(222, 2, 'hey ', '2025-01-27 16:51:08', 0, NULL, 0, NULL, NULL),
(223, 2, 'hey', '2025-01-27 16:51:12', 0, NULL, 0, NULL, NULL),
(224, 2, 'is that ok ? ', '2025-01-27 16:51:18', 0, NULL, 0, NULL, NULL),
(225, 2, 'why is the messaging not smooth ', '2025-01-27 16:51:27', 0, NULL, 0, NULL, NULL),
(226, 2, 'stop tryna be someone your not bro so🥰 , always against me ', '2025-01-27 16:52:43', 0, NULL, 0, NULL, NULL),
(227, 2, 'my tears gone cold I\'m wondering why , get out of bed at all , the morning rain clouds up my window and I can see it all and even if I coould it would all be grey, but your picture on my world it reminds me that its not so bad it\'s  not so bad ', '2025-01-27 16:54:08', 0, NULL, 0, NULL, NULL),
(228, 2, 'that\'s awesome ', '2025-01-27 16:54:26', 0, NULL, 0, NULL, NULL),
(229, 2, 'I didn\'t expect tha', '2025-01-27 16:54:32', 0, NULL, 0, NULL, NULL),
(230, 4, 'yo', '2025-01-28 00:10:03', 0, NULL, 0, NULL, NULL),
(231, 4, 'rjri7', '2025-01-28 00:10:15', 0, NULL, 0, NULL, NULL),
(232, 4, 'go open the group ', '2025-01-28 00:17:53', 0, NULL, 0, NULL, NULL),
(233, 4, 'yo', '2025-01-28 00:17:56', 0, NULL, 0, NULL, NULL),
(234, 4, 'yo ', '2025-01-28 00:18:05', 0, NULL, 0, NULL, NULL),
(235, 4, 'hlj', '2025-01-28 00:20:08', 0, NULL, 0, NULL, NULL),
(236, 4, 'hmm', '2025-01-28 07:26:33', 0, NULL, 0, NULL, NULL),
(237, 4, 'that\'s not cool as I taught man ', '2025-01-28 20:37:55', 0, NULL, 0, NULL, NULL),
(238, 4, 'apater', '2025-01-28 21:09:25', 0, NULL, 0, NULL, NULL),
(239, 4, 'yo', '2025-01-28 23:10:04', 0, NULL, 0, NULL, NULL),
(240, 4, 'this is becoming difficult ', '2025-01-29 08:02:58', 0, NULL, 0, NULL, NULL),
(241, 4, 'yo ', '2025-01-29 08:48:33', 0, NULL, 0, NULL, NULL),
(242, 2, 'take care ', '2025-01-29 08:57:01', 0, NULL, 0, NULL, NULL),
(243, 2, 'it\'s not how it seems to be ma', '2025-01-29 08:57:15', 0, NULL, 0, NULL, NULL),
(244, 2, 'h', '2025-01-29 08:57:37', 0, NULL, 0, NULL, NULL),
(245, 4, 'qui peut JoYeux comme la lateral ', '2025-01-31 06:57:09', 0, NULL, 0, NULL, NULL),
(246, 4, 'quand tu attend que rudiguer', '2025-01-31 06:57:38', 0, NULL, 0, NULL, NULL),
(247, 4, 'oh my b', '2025-01-31 21:47:33', 0, NULL, 0, NULL, NULL),
(248, 4, 'fin', '2025-01-31 21:47:39', 0, NULL, 0, NULL, NULL),
(249, 4, 'changes ', '2025-02-01 20:22:04', 0, NULL, 0, NULL, NULL),
(250, 4, 'quand tu attend que rudiguer', '2025-02-02 10:04:36', 0, NULL, 0, NULL, NULL),
(251, 4, '5', '2025-02-02 10:26:00', 0, NULL, 0, NULL, NULL),
(252, 4, '228747', '2025-02-02 10:26:09', 0, NULL, 0, NULL, NULL),
(253, 4, 'take this .', '2025-02-02 10:57:24', 0, NULL, 0, NULL, NULL),
(254, 4, 'whatsup', '2025-02-02 11:11:25', 0, NULL, 0, NULL, NULL),
(255, 4, 'sup bro ', '2025-02-06 14:25:11', NULL, NULL, 0, NULL, NULL),
(256, 4, 'yo', '2025-02-07 16:20:40', NULL, NULL, 0, NULL, NULL),
(257, 4, 'wow', '2025-02-07 16:20:54', NULL, NULL, 0, NULL, NULL);

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

--
-- Structure de la table `message_recipient`
--

CREATE TABLE `message_recipient` (
  `id` int(11) NOT NULL,
  `receiver_id` int(11) DEFAULT NULL,
  `message_id` int(11) DEFAULT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `message_recipient`
--

INSERT INTO `message_recipient` (`id`, `receiver_id`, `message_id`, `is_read`) VALUES
(3, 3, 3, 0),
(4, 1, 4, 0),
(10, 3, 10, 0),
(12, 3, 12, 0),
(14, 3, 14, 0),
(15, 3, 15, 0),
(16, 3, 16, 0),
(17, 3, 17, 0),
(18, 6, 18, 0),
(19, 6, 19, 0),
(20, 6, 20, 0),
(21, 6, 21, 0),
(22, 6, 22, 0),
(23, 6, 23, 0),
(24, 6, 24, 0),
(25, 6, 25, 0),
(26, 6, 26, 0),
(27, 6, 27, 0),
(28, 6, 28, 0),
(29, 6, 29, 0),
(30, 6, 30, 0),
(31, 6, 31, 0),
(32, 6, 32, 0),
(33, 6, 33, 0),
(34, 6, 34, 0),
(35, 3, NULL, 0),
(36, 3, NULL, 0),
(37, 6, NULL, 0),
(38, 3, NULL, 0),
(39, 6, NULL, 0),
(40, 3, NULL, 0),
(41, 6, NULL, 0),
(42, 3, NULL, 0),
(43, 3, NULL, 0),
(44, 3, NULL, 0),
(45, 3, NULL, 0),
(46, 3, NULL, 0),
(47, 6, NULL, 0),
(48, 1, NULL, 0),
(49, 6, NULL, 0),
(50, 6, NULL, 0),
(51, 6, NULL, 0),
(52, 6, NULL, 0),
(53, 6, NULL, 0),
(83, 6, NULL, 0),
(84, 6, NULL, 0),
(85, 6, NULL, 0),
(86, 6, NULL, 0),
(87, 1, NULL, 0),
(88, 1, NULL, 0),
(89, 1, NULL, 0),
(90, 1, NULL, 0),
(91, 1, NULL, 0),
(92, 1, NULL, 0),
(93, 1, NULL, 0),
(94, 1, NULL, 0),
(95, 1, NULL, 0),
(96, 1, NULL, 0),
(97, 1, NULL, 0),
(98, 1, NULL, 0),
(99, 1, NULL, 0),
(100, 1, NULL, 0),
(101, 1, NULL, 0),
(102, 1, NULL, 0),
(103, 1, NULL, 0),
(104, 1, NULL, 0),
(105, 1, NULL, 0),
(106, 1, NULL, 0),
(107, 1, NULL, 0),
(108, 1, NULL, 0),
(109, 1, NULL, 0),
(110, 1, NULL, 0),
(111, 1, NULL, 0),
(112, 1, NULL, 0),
(113, 1, NULL, 0),
(116, 1, NULL, 0),
(117, 6, NULL, 0),
(118, 6, NULL, 0),
(119, 6, NULL, 0),
(120, 6, NULL, 0),
(121, 6, NULL, 0),
(129, 6, NULL, 0),
(140, 6, NULL, 0),
(141, 6, NULL, 0),
(142, 3, NULL, 0),
(144, 1, NULL, 0),
(153, 1, NULL, 0),
(154, 3, NULL, 0),
(155, 1, NULL, 0),
(156, 1, NULL, 0),
(157, 1, 157, 0),
(158, 3, 158, 0),
(159, 1, 159, 0),
(160, 3, 160, 0),
(161, 1, 161, 0),
(162, 1, 162, 0),
(163, 3, 163, 0),
(174, 1, 174, 0),
(175, 1, 175, 0),
(176, 1, 176, 0),
(178, 1, 178, 0),
(180, 1, 180, 0),
(182, 1, 182, 0),
(183, 1, 183, 0),
(184, 1, 184, 0),
(185, 1, 185, 0),
(186, 1, 186, 0),
(187, 1, 187, 0),
(188, 1, 188, 0),
(189, 3, 189, 0),
(190, 3, 190, 0),
(191, 1, 191, 0),
(192, 3, 192, 0),
(193, 3, 193, 0),
(194, 1, 194, 0),
(195, 9, 195, 0),
(196, 1, 196, 0),
(197, 1, 197, 0),
(198, 1, 198, 0),
(199, 1, 199, 0),
(200, 3, 200, 0),
(201, 1, 201, 0),
(202, 4, 202, 0),
(203, 4, 203, 0),
(204, 4, 204, 0),
(205, 1, 205, 0),
(206, 1, 206, 0),
(207, 2, 207, 0),
(208, 3, 208, 0),
(209, 3, 209, 0),
(210, 3, 210, 0),
(211, 3, 211, 0),
(212, 3, 212, 0),
(213, 3, 213, 0),
(214, 3, 214, 0),
(215, 3, 215, 0),
(216, 3, 216, 0),
(217, 3, 217, 0),
(218, 3, 218, 0),
(219, 3, 219, 0),
(220, 4, 220, 0),
(221, 4, 221, 0),
(222, 4, 222, 0),
(223, 4, 223, 0),
(224, 4, 224, 0),
(225, 4, 225, 0),
(226, 4, 226, 0),
(227, 4, 227, 0),
(228, 4, 228, 0),
(229, 4, 229, 0),
(230, 2, 230, 0),
(231, 2, 231, 0),
(232, 3, 232, 0),
(233, 3, 233, 0),
(234, 3, 234, 0),
(235, 3, 235, 0),
(236, 2, 236, 0),
(237, 2, 237, 0),
(238, 2, 238, 0),
(239, 3, 239, 0),
(240, 2, 240, 0),
(241, 3, 241, 0),
(242, 4, 242, 0),
(243, 4, 243, 0),
(244, 4, 244, 0),
(245, 2, 245, 0),
(246, 2, 246, 0),
(247, 2, 247, 0),
(248, 2, 248, 0),
(249, 2, 249, 0),
(250, 2, 250, 0),
(251, 2, 251, 0),
(252, 2, 252, 0),
(253, 2, 253, 0),
(254, 2, 254, 0),
(255, 3, 255, 0),
(256, 3, 256, 0),
(257, 3, 257, 0);

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

--
-- Structure de la table `post`
--

CREATE TABLE `post` (
  `id` int(11) NOT NULL,
  `post_owner` int(11) NOT NULL,
  `post_visibility` int(11) NOT NULL DEFAULT 0,
  `post_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `post_edit_date` timestamp NULL DEFAULT NULL,
  `text_content` text DEFAULT NULL,
  `picture_media` text DEFAULT NULL,
  `video_media` text DEFAULT NULL,
  `post_place` int(11) DEFAULT 1,
  `is_shared` int(11) DEFAULT 0,
  `post_shared_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `post`
--

INSERT INTO `post` (`id`, `post_owner`, `post_visibility`, `post_date`, `post_edit_date`, `text_content`, `picture_media`, `video_media`, `post_place`, `is_shared`, `post_shared_id`) VALUES
(2, 4, 1, '2025-01-28 18:51:22', NULL, '', 'data/users/Flaubert/posts/6799272a7abbd3.58575815/media/pictures/96484958eeee028695fa3cd99017f254499b1c39f0496068c46a827bb4a7fc28.jpg,7956af02c7195cd4904af121c594c5e26ea9bff26df3382eee547aaf1cb7ce7a.jpg,53eba4c40cb4fbbaf8b5a5c8955dbb2734839e84e7b9992981a34e76b2f5d713.PNG', 'data/users/Flaubert/posts/6799272a7abbd3.58575815/media/videos/', 1, 0, NULL),
(3, 4, 1, '2025-01-28 18:51:48', NULL, '', 'data/users/Flaubert/posts/67992744f116f0.74849443/media/pictures/3d321396a72bd61224e23c56ae12607fc5786b2e86841f4474a92c65cf41a52b.PNG,6374bfc1318bea3da5de61df0d128c61499efb9b6e2513b1d0991a06ba44a50d.png,d3191b8a8946d5b3dadf90e0c7f128c90351000ee4954cfcc6dedb360ae54aec.png,151412c0d20fa5be072d4c7e47f183cfdd1cc0eda99452c215d55f694f714e7f.png,0078c4f181b94c7e734e5c6f7c202fff457cfe55d8aa78f016929cfeae1c07e2.png', 'data/users/Flaubert/posts/67992744f116f0.74849443/media/videos/', 1, 0, NULL),
(4, 4, 1, '2025-01-28 18:52:01', NULL, '', 'data/users/Flaubert/posts/67992751b4c4d2.35488717/media/pictures/d3d11804909ef333c075fd0148bed56c0bb25ef1cafa39f076b39f0ad07111bf.png,8a8aea76a8f56e6f22a5be7fa1bd4270bb27e92daf1385d6748b093aadf2c7a1.png', 'data/users/Flaubert/posts/67992751b4c4d2.35488717/media/videos/', 1, 0, NULL),
(5, 4, 1, '2025-01-28 19:05:32', NULL, 'i taught it would have been more difficult &lt;br/&gt;', 'data/users/Flaubert/posts/67992a7c08beb5.60068004/media/pictures/9694bec7b4ff44676711bc899fd859de7ba958038d06a9fc02a09d4f05dfdfb9.png,a7626f122e1139cb806382a624fe8d066f44e6650cf750560c72279fdf8ff3d3.png,5f60880ae736812d84e86778b31b7f999cadd3c0b3e5356a4268e295dc992e36.png,7b8de9d98eb7d0288c4c1021216b5d3a84ae36b3210db017b38005f173a4193d.png,d515a05cb861c6f74b997c5e49f5b35741da1065279e267f478a1c614f635bbf.png', 'data/users/Flaubert/posts/67992a7c08beb5.60068004/media/videos/', 1, 0, NULL),
(7, 2, 1, '2025-01-28 21:10:44', NULL, 'I know must of you dont know much about hime but he is the founder and CEO of both Telsa and SpaceX and he is the man who want to bring people to mars, make sure you follow him, like his post and stay updated on news about him, i am happy you guys often listen and do things the correct way, many people might not know but i like this guy cause of the kind of impage he has on individuals', 'data/users/EliasEtah/posts/679947d47f1bc3.25242574/media/pictures/df8e3b7096c634703c4d93aee88a220598ecd096663125639c54ec81ea6e070a.jpg,d866f73967dc9930ff87da375eaa91c35d0703b9830fbb276a5027740606ab17.jpg', 'data/users/EliasEtah/posts/679947d47f1bc3.25242574/media/videos/', 1, 0, NULL);

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

--
-- Structure de la table `post_place`
--

CREATE TABLE `post_place` (
  `id` int(11) NOT NULL,
  `post_place` varchar(40) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `post_place`
--

INSERT INTO `post_place` (`id`, `post_place`) VALUES
(1, 'timeline'),
(2, 'group');

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

--
-- Structure de la table `post_visibility`
--

CREATE TABLE `post_visibility` (
  `id` int(11) NOT NULL,
  `visibility` varchar(40) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `post_visibility`
--

INSERT INTO `post_visibility` (`id`, `visibility`) VALUES
(1, 'public'),
(2, 'friends'),
(3, 'only me');

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

--
-- Structure de la table `quickies`
--

CREATE TABLE `quickies` (
  `id` int(11) NOT NULL,
  `video_id` int(11) NOT NULL,
  `views` int(11) DEFAULT 0,
  `likes` int(11) DEFAULT 0,
  `comments` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `quickies`
--

INSERT INTO `quickies` (`id`, `video_id`, `views`, `likes`, `comments`) VALUES
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(0, 6, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(0, 6, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(0, 6, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(1, 38, 0, 0, 0),
(0, 6, 0, 0, 0);

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

--
-- Structure de la table `q_comments`
--

CREATE TABLE `q_comments` (
  `id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `video_id` int(11) NOT NULL,
  `comment` text DEFAULT NULL,
  `comment_type` enum('public','private') NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `like_count` int(11) DEFAULT 0,
  `dislike_count` int(11) DEFAULT 0,
  `encrypted_comment` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `q_comments`
--

INSERT INTO `q_comments` (`id`, `user_id`, `video_id`, `comment`, `comment_type`, `timestamp`, `like_count`, `dislike_count`, `encrypted_comment`) VALUES
(1, 4, 11, 'Gonna find a way ', 'public', '2025-02-02 10:44:46', 0, 0, NULL),
(2, 4, 11, '', 'private', '2025-02-02 10:45:05', 0, 0, 'ek9nMHJRdUc0S2JZQXIxZFp3aDVoT0F0MWxnMlpxZmNWTGxueEY1Tlhzbz0='),
(3, 4, 11, '', 'private', '2025-02-02 10:45:06', 0, 0, 'ek9nMHJRdUc0S2JZQXIxZFp3aDVoT0F0MWxnMlpxZmNWTGxueEY1Tlhzbz0=');

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

--
-- Structure de la table `saved_videos`
--

CREATE TABLE `saved_videos` (
  `id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `video_id` int(11) NOT NULL,
  `saved_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Structure de la table `schedules`
--

CREATE TABLE `schedules` (
  `id` int(11) NOT NULL,
  `video_id` int(11) NOT NULL,
  `datetime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `schedules`
--

INSERT INTO `schedules` (`id`, `video_id`, `datetime`) VALUES
(1, 9, '2025-01-26 05:05:00'),
(2, 10, '2025-01-26 13:15:00'),
(3, 9, '2025-01-26 14:29:00'),
(4, 10, '2025-01-26 12:45:00'),
(5, 10, '2025-01-26 15:33:00'),
(6, 10, '2025-01-26 15:33:00'),
(7, 10, '2025-01-26 15:33:00'),
(8, 10, '2025-01-26 19:33:00'),
(9, 10, '2025-01-26 19:33:00'),
(10, 9, '2025-01-26 19:09:00'),
(11, 10, '2025-01-26 21:45:00'),
(12, 10, '2025-01-26 11:45:00'),
(13, 10, '2025-01-26 20:45:00'),
(14, 10, '2025-01-26 15:51:00'),
(15, 10, '2025-01-26 15:51:00'),
(16, 10, '2025-01-26 21:51:00'),
(17, 10, '2025-01-26 16:02:00'),
(18, 10, '2025-01-26 18:02:00'),
(19, 9, '2025-01-26 21:02:00'),
(20, 10, '2025-01-26 16:11:00'),
(21, 10, '2025-01-27 07:07:00'),
(22, 10, '2025-01-27 08:24:00'),
(23, 9, '2025-01-27 07:53:00'),
(24, 10, '2025-01-27 18:26:00'),
(25, 15, '2025-01-29 09:00:00'),
(26, 14, '2025-02-01 23:00:00'),
(27, 13, '2025-02-04 10:23:00'),
(28, 15, '2025-02-06 13:30:00');

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

--
-- Structure de la table `statuses`
--

CREATE TABLE `statuses` (
  `id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `media_type` enum('image','video') DEFAULT NULL,
  `media_url` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `background_color` varchar(7) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Structure de la table `streams`
--

CREATE TABLE `streams` (
  `id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `stream_key` varchar(255) NOT NULL,
  `is_live` tinyint(1) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Structure de la table `user_follow`
--

CREATE TABLE `user_follow` (
  `id` int(11) NOT NULL,
  `follower_id` int(11) NOT NULL,
  `followed_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `user_follow`
--

INSERT INTO `user_follow` (`id`, `follower_id`, `followed_id`) VALUES
(8, 4, 1),
(9, 4, 3),
(10, 4, 6);

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

--
-- Structure de la table `user_metadata`
--

CREATE TABLE `user_metadata` (
  `id` int(11) NOT NULL,
  `label` varchar(200) DEFAULT NULL,
  `content` varchar(200) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `user_metadata`
--

INSERT INTO `user_metadata` (`id`, `label`, `content`, `user_id`) VALUES
(1, 'sd', 'sds', 1),
(2, 'yo', 'sdafsd', 6),
(3, 'dsfds', 'dsfsdf', 6),
(4, 'sdfsdf', 'dfsdfsd', 6),
(5, 'fsdfsd', 'fdfsd', 6),
(6, 'fsdfsdf', 'sdfdsf', 6),
(7, 'sdfsfsd', 'fsdfsdf', 6),
(8, 'Work', 'CEO at Vitera', 1),
(9, 'Works at', 'Vitera', 1),
(10, 'Education', 'National Advanced School of Post and Telecommunication', 1),
(11, 'Sex', 'Male', 1);

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

--
-- Structure de la table `user_relation`
--

CREATE TABLE `user_relation` (
  `from` int(11) NOT NULL,
  `to` int(11) NOT NULL,
  `status` varchar(1) DEFAULT NULL,
  `since` timestamp NOT NULL DEFAULT current_timestamp(),
  `id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `user_relation`
--

INSERT INTO `user_relation` (`from`, `to`, `status`, `since`, `id`) VALUES
(6, 1, 'F', '2024-09-25 05:55:23', 9),
(1, 6, 'F', '2024-09-25 06:55:24', 10),
(1, 3, 'F', '2024-09-27 16:54:38', 13),
(3, 1, 'F', '2024-09-27 17:54:39', 14),
(3, 6, 'F', '2024-09-28 10:42:03', 15),
(6, 3, 'F', '2024-09-28 11:42:03', 16),
(9, 1, 'F', '2024-09-30 15:42:58', 17),
(1, 9, 'F', '2024-09-30 17:42:58', 18),
(3, 4, 'F', '2025-01-26 03:13:55', 19),
(1, 4, 'F', '2025-01-26 03:13:58', 20),
(4, 3, 'F', '2025-01-26 03:13:56', 21),
(4, 1, 'F', '2025-01-26 03:13:58', 22),
(4, 2, 'F', '2025-01-26 03:14:33', 23),
(2, 4, 'F', '2025-01-26 03:14:33', 24);

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

--
-- Structure de la table `user_type`
--

CREATE TABLE `user_type` (
  `id` int(11) NOT NULL,
  `type_name` varchar(30) DEFAULT NULL,
  `permission` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `user_type`
--

INSERT INTO `user_type` (`id`, `type_name`, `permission`) VALUES
(1, 'Normal user', NULL),
(2, 'Admin', '{\'Admin\':1}');

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

--
-- Structure de la table `user_views`
--

CREATE TABLE `user_views` (
  `user_id` bigint(20) NOT NULL,
  `video_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `user_views`
--

INSERT INTO `user_views` (`user_id`, `video_id`) VALUES
(3344, 25),
(3344, 26),
(3344, 29),
(3344, 30),
(37228, 26),
(1442771, 25),
(1442771, 26),
(1442771, 27),
(1442771, 28),
(1442771, 29),
(1442771, 30),
(1442771, 32),
(1442771, 33),
(1442771, 34),
(1442771, 36),
(1442771, 37),
(1442771, 38),
(1442771, 39),
(87053965, 26),
(87053965, 29),
(385792354341325, 25),
(385792354341325, 26),
(385792354341325, 27),
(385792354341325, 28),
(385792354341325, 29),
(385792354341325, 30),
(512404871496927, 25),
(512404871496927, 26),
(512404871496927, 27),
(512404871496927, 28),
(512404871496927, 29),
(512404871496927, 30),
(512404871496927, 32),
(512404871496927, 33),
(512404871496927, 34),
(512404871496927, 35),
(512404871496927, 36),
(512404871496927, 37),
(512404871496927, 38),
(512404871496927, 39),
(3344, 25),
(3344, 26),
(3344, 29),
(3344, 30),
(37228, 26),
(1442771, 25),
(1442771, 26),
(1442771, 27),
(1442771, 28),
(1442771, 29),
(1442771, 30),
(1442771, 32),
(1442771, 33),
(1442771, 34),
(1442771, 36),
(1442771, 37),
(1442771, 38),
(1442771, 39),
(87053965, 26),
(87053965, 29),
(385792354341325, 25),
(385792354341325, 26),
(385792354341325, 27),
(385792354341325, 28),
(385792354341325, 29),
(385792354341325, 30),
(512404871496927, 25),
(512404871496927, 26),
(512404871496927, 27),
(512404871496927, 28),
(512404871496927, 29),
(512404871496927, 30),
(512404871496927, 32),
(512404871496927, 33),
(512404871496927, 34),
(512404871496927, 35),
(512404871496927, 36),
(512404871496927, 37),
(512404871496927, 38),
(512404871496927, 39),
(3344, 25),
(3344, 26),
(3344, 29),
(3344, 30),
(37228, 26),
(1442771, 25),
(1442771, 26),
(1442771, 27),
(1442771, 28),
(1442771, 29),
(1442771, 30),
(1442771, 32),
(1442771, 33),
(1442771, 34),
(1442771, 36),
(1442771, 37),
(1442771, 38),
(1442771, 39),
(87053965, 26),
(87053965, 29),
(385792354341325, 25),
(385792354341325, 26),
(385792354341325, 27),
(385792354341325, 28),
(385792354341325, 29),
(385792354341325, 30),
(512404871496927, 25),
(512404871496927, 26),
(512404871496927, 27),
(512404871496927, 28),
(512404871496927, 29),
(512404871496927, 30),
(512404871496927, 32),
(512404871496927, 33),
(512404871496927, 34),
(512404871496927, 35),
(512404871496927, 36),
(512404871496927, 37),
(512404871496927, 38),
(512404871496927, 39),
(3344, 25),
(3344, 26),
(3344, 29),
(3344, 30),
(37228, 26),
(1442771, 25),
(1442771, 26),
(1442771, 27),
(1442771, 28),
(1442771, 29),
(1442771, 30),
(1442771, 32),
(1442771, 33),
(1442771, 34),
(1442771, 36),
(1442771, 37),
(1442771, 38),
(1442771, 39),
(87053965, 26),
(87053965, 29),
(385792354341325, 25),
(385792354341325, 26),
(385792354341325, 27),
(385792354341325, 28),
(385792354341325, 29),
(385792354341325, 30),
(512404871496927, 25),
(512404871496927, 26),
(512404871496927, 27),
(512404871496927, 28),
(512404871496927, 29),
(512404871496927, 30),
(512404871496927, 32),
(512404871496927, 33),
(512404871496927, 34),
(512404871496927, 35),
(512404871496927, 36),
(512404871496927, 37),
(512404871496927, 38),
(512404871496927, 39),
(1, 0),
(1, 2),
(1, 1),
(6, 2),
(3, 4),
(3, 2),
(1, 4),
(3, 1),
(3, 3),
(1, 5),
(1, 3),
(3, 5),
(6, 5),
(6, 3),
(4, 10),
(4, 14),
(4, 9);

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

--
-- Structure de la table `videos`
--

CREATE TABLE `videos` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `filename` varchar(255) NOT NULL,
  `thumbnail` varchar(255) NOT NULL,
  `resolutions` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `views` int(11) DEFAULT 0,
  `duration` varchar(8) DEFAULT NULL,
  `video_type` enum('normal','quickie') NOT NULL,
  `upload_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `userid` int(11) DEFAULT NULL,
  `original_video_path` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `videos`
--

INSERT INTO `videos` (`id`, `title`, `description`, `filename`, `thumbnail`, `resolutions`, `created_at`, `views`, `duration`, `video_type`, `upload_date`, `userid`, `original_video_path`) VALUES
(7, 'First Video ', '26/01/2025', 'video_1737862990623.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737862990623_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737862990623_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737862990623_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737862990623_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737862990623_1080p_h264.mp4\"}}', '2025-01-26 03:44:27', 0, '00:00:11', 'quickie', '2025-01-26 03:44:27', 4, NULL),
(8, 'Ariana Grande ', 'This is Ariana Crying ', 'video_1737863167057.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737863167057_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737863167057_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737863167057_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737863167057_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737863167057_1080p_h264.mp4\"}}', '2025-01-26 03:47:33', 0, '00:00:23', 'quickie', '2025-01-26 03:47:33', 4, NULL),
(9, 'Darsy & Evhan  ft Sean Brignton - Mon Coeur fait', 'A song by darsy , this is sooo, coool ', 'Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon Cœur Fait (Clip Officiel).mp4', 'assets/php/thumbnails/darsy.png', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon C\\u0153ur Fait (Clip Officiel)_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon C\\u0153ur Fait (Clip Officiel)_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon C\\u0153ur Fait (Clip Officiel)_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon C\\u0153ur Fait (Clip Officiel)_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon C\\u0153ur Fait (Clip Officiel)_1080p_h264.mp4\"}}', '2025-01-26 04:02:23', 1, '00:04:14', 'normal', '2025-01-26 04:02:23', 4, 'C:/xampp/htdocs/Flausite/assets/php/videos/Darsy & Evhan\'s & Sean Bridon & Yaya Vichenzo - Mon Cœur Fait (Clip Officiel).mp4'),
(10, 'Ali Gatie-Can\'t let you go', 'A song by  Ali- Gatie, cant let you go ', 'Ali Gatie - Can\'t Let You Go (Lyrics).mp4', 'assets/php/thumbnails/ali.PNG', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ali Gatie - Can\'t Let You Go (Lyrics)_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ali Gatie - Can\'t Let You Go (Lyrics)_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ali Gatie - Can\'t Let You Go (Lyrics)_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ali Gatie - Can\'t Let You Go (Lyrics)_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ali Gatie - Can\'t Let You Go (Lyrics)_1080p_h264.mp4\"}}', '2025-01-26 04:36:08', 1, '00:03:24', 'normal', '2025-01-26 04:36:08', 4, 'C:/xampp/htdocs/Flausite/assets/php/videos/Ali Gatie - Can\'t Let You Go (Lyrics).mp4'),
(11, 'Motivational Quotes ', 'Motivational Quotes: 26 January 2025 ', 'video_1737886399720.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737886399720_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737886399720_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737886399720_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737886399720_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737886399720_1080p_h264.mp4\"}}', '2025-01-26 10:14:23', 0, '00:00:13', 'quickie', '2025-01-26 10:14:23', 1, NULL),
(12, 'Just Swapping ', 'Just Swapping ', 'video_1737917942032.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737917942032_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737917942032_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737917942032_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737917942032_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1737917942032_1080p_h264.mp4\"}}', '2025-01-26 19:00:04', 0, '00:00:10', 'quickie', '2025-01-26 19:00:04', 4, NULL),
(13, 'Boy Spyce- pepe', 'This is a song by Boy Spyce - Pepe, released last year , it was a hit ', 'Boy Spyce - Pepe (Official Video Edit).mp4', 'assets/php/thumbnails/Screenshot 2024-12-17 104843.png', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Boy Spyce - Pepe (Official Video Edit)_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Boy Spyce - Pepe (Official Video Edit)_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Boy Spyce - Pepe (Official Video Edit)_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Boy Spyce - Pepe (Official Video Edit)_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Boy Spyce - Pepe (Official Video Edit)_1080p_h264.mp4\"}}', '2025-01-28 20:24:17', 0, '00:03:21', 'normal', '2025-01-28 20:24:17', 2, 'C:/xampp/htdocs/Flausite/assets/php/videos/Boy Spyce - Pepe (Official Video Edit).mp4'),
(14, 'Kocee- Mama', 'This is a music Kocee released in 2023 , its awesome ', 'Ko-c - Mama [Official Video].mp4', 'assets/php/thumbnails/Screenshot 2024-11-08 092323.png', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ko-c - Mama [Official Video]_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ko-c - Mama [Official Video]_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ko-c - Mama [Official Video]_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ko-c - Mama [Official Video]_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Ko-c - Mama [Official Video]_1080p_h264.mp4\"}}', '2025-01-28 20:53:21', 1, '00:03:14', 'normal', '2025-01-28 20:53:21', 2, 'C:/xampp/htdocs/Flausite/assets/php/videos/Ko-c - Mama [Official Video].mp4'),
(15, 'Doechii - What it is', 'This is a song by Doechii, released in 2021, its awesome, check it out ', 'Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video].mp4', 'assets/php/thumbnails/Screenshot 2024-10-20 152306.png', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video]_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video]_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video]_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video]_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video]_1080p_h264.mp4\"}}', '2025-01-28 21:18:32', 0, '00:03:44', 'normal', '2025-01-28 21:18:32', 2, 'C:/xampp/htdocs/Flausite/assets/php/videos/Doechii - What It Is (Block Boy) feat. Kodak Black [Official Video].mp4'),
(17, 'This is one of my favourites ', 'this is it ', 'video_1738888794164.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738888794164_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738888794164_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738888794164_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738888794164_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738888794164_1080p_h264.mp4\"}}', '2025-02-07 00:42:15', 0, '00:00:42', 'quickie', '2025-02-07 00:42:15', 4, NULL),
(18, 'Impressive Dance ', '07/02/2025', 'video_1738934213095.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934213095_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934213095_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934213095_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934213095_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934213095_1080p_h264.mp4\"}}', '2025-02-07 13:18:01', 0, '00:00:25', 'quickie', '2025-02-07 13:18:01', 4, NULL),
(19, 'When it happened ', 'IT JUST Happened ', 'video_1738934495040.mp4', '', '{\"240p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934495040_240p_h264.mp4\"},\"360p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934495040_360p_h264.mp4\"},\"480p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934495040_480p_h264.mp4\"},\"720p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934495040_720p_h264.mp4\"},\"1080p\":{\"h264\":\"assets\\/php\\/transcoded_videos\\/video_1738934495040_1080p_h264.mp4\"}}', '2025-02-07 13:22:37', 0, '00:00:23', 'quickie', '2025-02-07 13:22:37', 4, NULL);

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

--
-- Structure de la table `video_history`
--

CREATE TABLE `video_history` (
  `id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `video_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `thumbnail` varchar(255) NOT NULL,
  `timestamp` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `video_history`
--

INSERT INTO `video_history` (`id`, `user_id`, `video_id`, `title`, `thumbnail`, `timestamp`) VALUES
(1, 4, 10, 'Ali Gatie-Can\'t let you go', 'assets/php/thumbnails/ali.PNG', '2025-01-28 18:54:34'),
(2, 4, 14, 'Kocee- Mama', 'assets/php/thumbnails/Screenshot 2024-11-08 092323.png', '2025-02-04 01:58:41'),
(3, 4, 9, 'Darsy & Evhan  ft Sean Brignton - Mon Coeur fait', 'assets/php/thumbnails/darsy.png', '2025-02-06 15:07:21');

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

--
-- Structure de la table `video_likes`
--

CREATE TABLE `video_likes` (
  `id` int(11) NOT NULL,
  `video_id` int(11) NOT NULL,
  `type` enum('like','dislike') NOT NULL,
  `userid` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Déchargement des données de la table `video_likes`
--

INSERT INTO `video_likes` (`id`, `video_id`, `type`, `userid`) VALUES
(7, 2, 'like', 1),
(8, 2, 'dislike', 1),
(9, 5, 'dislike', 3),
(10, 5, 'like', 3),
(11, 1, 'like', 3),
(12, 9, 'like', 4);

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

--
-- Structure de la table `video_reactions`
--

CREATE TABLE `video_reactions` (
  `id` int(11) NOT NULL,
  `video_id` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `reaction_type` enum('like','dislike') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Structure de la table `writing_message_notifier`
--

CREATE TABLE `writing_message_notifier` (
  `message_writer` int(11) DEFAULT NULL,
  `message_waiter` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Index pour les tables déchargées
--

--
-- Index pour la table `channel`
--
ALTER TABLE `channel`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `cinema_chat`
--
ALTER TABLE `cinema_chat`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `comment`
--
ALTER TABLE `comment`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `video_id` (`video_id`);

--
-- Index pour la table `contacts`
--
ALTER TABLE `contacts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `contact_id` (`contact_id`);

--
-- Index pour la table `dislikes`
--
ALTER TABLE `dislikes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_dislike` (`video_id`,`user_id`),
  ADD KEY `user_id` (`user_id`);

--
-- Index pour la table `invitations`
--
ALTER TABLE `invitations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `friend_id` (`friend_id`),
  ADD KEY `schedule_id` (`schedule_id`);

--
-- Index pour la table `like`
--
ALTER TABLE `like`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_index` (`post_id`,`user_id`);

--
-- Index pour la table `likes`
--
ALTER TABLE `likes`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `message`
--
ALTER TABLE `message`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `message_recipient`
--
ALTER TABLE `message_recipient`
  ADD PRIMARY KEY (`id`),
  ADD KEY `message_id` (`message_id`);

--
-- Index pour la table `post`
--
ALTER TABLE `post`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_post_place` (`post_place`);

--
-- Index pour la table `post_place`
--
ALTER TABLE `post_place`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `post_visibility`
--
ALTER TABLE `post_visibility`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `q_comments`
--
ALTER TABLE `q_comments`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `schedules`
--
ALTER TABLE `schedules`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `user_follow`
--
ALTER TABLE `user_follow`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `follow_unique` (`follower_id`,`followed_id`);

--
-- Index pour la table `user_metadata`
--
ALTER TABLE `user_metadata`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_label_UK` (`label`,`user_id`);

--
-- Index pour la table `user_relation`
--
ALTER TABLE `user_relation`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `UNIQUE_RELATION` (`from`,`to`,`status`);

--
-- Index pour la table `user_type`
--
ALTER TABLE `user_type`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `videos`
--
ALTER TABLE `videos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_user_info` (`userid`);

--
-- Index pour la table `video_history`
--
ALTER TABLE `video_history`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `video_likes`
--
ALTER TABLE `video_likes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`);

--
-- AUTO_INCREMENT pour les tables déchargées
--

--
-- AUTO_INCREMENT pour la table `channel`
--
ALTER TABLE `channel`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=202;

--
-- AUTO_INCREMENT pour la table `cinema_chat`
--
ALTER TABLE `cinema_chat`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT pour la table `comment`
--
ALTER TABLE `comment`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT pour la table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79;

--
-- AUTO_INCREMENT pour la table `invitations`
--
ALTER TABLE `invitations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT pour la table `like`
--
ALTER TABLE `like`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT pour la table `likes`
--
ALTER TABLE `likes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT pour la table `message`
--
ALTER TABLE `message`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=258;

--
-- AUTO_INCREMENT pour la table `message_recipient`
--
ALTER TABLE `message_recipient`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=258;

--
-- AUTO_INCREMENT pour la table `post`
--
ALTER TABLE `post`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT pour la table `post_place`
--
ALTER TABLE `post_place`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT pour la table `post_visibility`
--
ALTER TABLE `post_visibility`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `q_comments`
--
ALTER TABLE `q_comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `schedules`
--
ALTER TABLE `schedules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT pour la table `user_follow`
--
ALTER TABLE `user_follow`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT pour la table `user_metadata`
--
ALTER TABLE `user_metadata`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT pour la table `user_relation`
--
ALTER TABLE `user_relation`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT pour la table `user_type`
--
ALTER TABLE `user_type`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT pour la table `videos`
--
ALTER TABLE `videos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT pour la table `video_history`
--
ALTER TABLE `video_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `video_likes`
--
ALTER TABLE `video_likes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- Contraintes pour les tables déchargées
--

--
-- Contraintes pour la table `comments`
--
ALTER TABLE `comments`
  ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`),
  ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`video_id`) REFERENCES `videos` (`id`);

--
-- Contraintes pour la table `invitations`
--
ALTER TABLE `invitations`
  ADD CONSTRAINT `invitations_ibfk_1` FOREIGN KEY (`friend_id`) REFERENCES `user_info` (`id`),
  ADD CONSTRAINT `invitations_ibfk_2` FOREIGN KEY (`schedule_id`) REFERENCES `schedules` (`id`);

--
-- Contraintes pour la table `post`
--
ALTER TABLE `post`
  ADD CONSTRAINT `fk_post_place` FOREIGN KEY (`post_place`) REFERENCES `post_place` (`id`);
COMMIT;

