-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 13, 2026 at 10:43 AM
-- Server version: 8.0.33-cll-lve
-- PHP Version: 8.1.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 */;

--
-- Database: `diginspire_reel`
--

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Music', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(2, 'Sports', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(3, 'Comedy', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(4, 'Technology', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(5, 'Education', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(6, 'Lifestyle', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(7, 'Travel', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(8, 'Food', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(9, 'Fashion', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(10, 'Movies', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(11, 'Health', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(12, 'Gaming', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(13, 'News', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(14, 'Politics', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(15, 'Science', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(16, 'Art', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(17, 'Books', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(18, 'Music Videos', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(19, 'Fitness', '2024-11-22 05:12:31', '2024-11-22 05:12:31'),
(20, 'Documentary', '2024-11-22 05:12:31', '2024-11-22 05:12:31');

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

--
-- Table structure for table `otps`
--

CREATE TABLE `otps` (
  `id` int NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `otp` varchar(6) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `expires_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `otps`
--

INSERT INTO `otps` (`id`, `mobile`, `otp`, `created_at`, `expires_at`) VALUES
(3, '1234567890', '492689', '2024-11-21 09:35:56', '2024-11-21 09:45:56'),
(4, '1234567890', '506902', '2024-11-21 09:39:52', '2024-11-21 09:49:52'),
(5, '1234567890', '825834', '2024-11-21 09:43:59', '2024-11-21 09:53:59'),
(6, '1234567891', '878671', '2024-11-22 05:14:00', '2024-11-22 05:24:00'),
(7, '1234567891', '634261', '2024-11-22 05:14:44', '2024-11-22 05:24:44'),
(8, '1234567891', '350634', '2024-11-22 13:45:58', '2024-11-22 13:55:58'),
(9, '1234567892', '900219', '2024-11-22 21:45:06', '2024-11-22 21:55:06'),
(10, '1234567891', '398667', '2024-11-22 21:48:44', '2024-11-22 21:58:44'),
(11, '1234567891', '221739', '2024-11-23 00:29:13', '2024-11-23 00:39:13'),
(12, '1234567891', '933669', '2024-11-23 00:29:29', '2024-11-23 00:39:29'),
(13, '1234567891', '905175', '2024-11-23 09:29:28', '2024-11-23 09:39:28'),
(14, '1234567891', '679692', '2024-11-23 09:34:07', '2024-11-23 09:44:07'),
(15, '1234567892', '214642', '2024-11-23 11:05:59', '2024-11-23 11:15:59'),
(16, '1234567892', '730910', '2024-11-23 11:06:32', '2024-11-23 11:16:32'),
(17, '1234567892', '373039', '2024-11-23 11:13:05', '2024-11-23 11:23:05'),
(18, '1234567892', '429909', '2024-11-23 11:14:09', '2024-11-23 11:24:09'),
(19, '1234567892', '297715', '2024-11-23 11:23:51', '2024-11-23 11:33:51'),
(20, '1234567892', '590621', '2024-11-23 12:16:36', '2024-11-23 12:26:36'),
(21, '1234567892', '732536', '2024-11-23 12:17:46', '2024-11-23 12:27:46'),
(22, '1234567892', '352688', '2024-11-23 12:18:00', '2024-11-23 12:28:00'),
(23, '1234567891', '287696', '2024-11-23 12:37:45', '2024-11-23 12:47:45'),
(24, '1234567891', '345740', '2024-11-23 12:40:49', '2024-11-23 12:50:49'),
(25, '1234567891', '706155', '2024-11-23 12:45:13', '2024-11-23 12:55:13'),
(26, '1234567891', '715525', '2024-11-23 12:49:41', '2024-11-23 12:59:41'),
(27, '1234567891', '246360', '2024-11-23 12:49:45', '2024-11-23 12:59:45'),
(28, '1234567891', '431052', '2024-11-23 12:49:46', '2024-11-23 12:59:46'),
(29, '1234567891', '861031', '2024-11-23 12:49:47', '2024-11-23 12:59:47'),
(30, '1234567891', '632091', '2024-11-23 12:49:48', '2024-11-23 12:59:48'),
(31, '1234567891', '620809', '2024-11-23 12:49:50', '2024-11-23 12:59:50'),
(32, '1234567891', '406095', '2024-11-23 12:51:41', '2024-11-23 13:01:41'),
(33, '1234567891', '427201', '2024-11-23 12:51:45', '2024-11-23 13:01:45'),
(34, '1234567891', '657483', '2024-11-23 12:52:31', '2024-11-23 13:02:31'),
(35, '1234567891', '607533', '2024-11-23 12:58:37', '2024-11-23 13:08:37'),
(36, '1234567891', '242692', '2024-11-23 12:59:55', '2024-11-23 13:09:55'),
(37, '1234567891', '123374', '2024-11-23 13:03:15', '2024-11-23 13:13:15'),
(38, '1234567891', '860590', '2024-11-23 13:04:37', '2024-11-23 13:14:37'),
(39, '1234567891', '485521', '2024-11-23 13:12:01', '2024-11-23 13:22:01'),
(40, '1234567891', '637151', '2024-11-23 13:12:09', '2024-11-23 13:22:09'),
(41, '1234567891', '222339', '2024-11-23 13:12:13', '2024-11-23 13:22:13'),
(42, '1234567891', '964291', '2024-11-23 13:12:20', '2024-11-23 13:22:20'),
(43, '1234567891', '250203', '2024-11-23 13:12:23', '2024-11-23 13:22:23'),
(44, '1234567891', '948876', '2024-11-23 13:17:00', '2024-11-23 13:27:00'),
(45, '1234567891', '118794', '2024-11-23 13:19:39', '2024-11-23 13:29:39'),
(46, '1234567891', '270914', '2024-11-23 13:19:54', '2024-11-23 13:29:54'),
(47, '1234567891', '887991', '2024-11-23 13:22:45', '2024-11-23 13:32:45'),
(48, '1234567891', '262316', '2024-11-23 13:23:00', '2024-11-23 13:33:00'),
(49, '1234567891', '324643', '2024-11-23 13:23:19', '2024-11-23 13:33:19'),
(50, '1234567891', '898870', '2024-11-23 13:23:37', '2024-11-23 13:33:37'),
(51, '1234567891', '289194', '2024-11-23 13:23:55', '2024-11-23 13:33:55'),
(52, '1234567891', '485450', '2024-11-23 13:27:50', '2024-11-23 13:37:50'),
(53, '1234567891', '198461', '2024-11-23 13:28:36', '2024-11-23 13:38:36'),
(54, '1234567891', '229980', '2024-11-23 13:30:52', '2024-11-23 13:40:52'),
(55, '1234567891', '946511', '2024-11-23 13:31:47', '2024-11-23 13:41:47'),
(56, '1234567891', '764751', '2024-11-23 13:37:58', '2024-11-23 13:47:58'),
(57, '1234567891', '234503', '2024-11-23 13:42:24', '2024-11-23 13:52:24'),
(58, '1234567891', '686331', '2024-11-23 13:53:36', '2024-11-23 14:03:36'),
(59, '1234567891', '501265', '2024-11-23 13:55:08', '2024-11-23 14:05:08'),
(60, '1234567891', '341962', '2024-11-23 13:58:57', '2024-11-23 14:08:57'),
(61, '1234567891', '196797', '2024-11-23 13:59:04', '2024-11-23 14:09:04'),
(62, '1234567891', '252833', '2024-11-23 14:01:24', '2024-11-23 14:11:24'),
(63, '1234567891', '689099', '2024-11-23 14:01:34', '2024-11-23 14:11:34'),
(64, '1234567891', '158416', '2024-11-23 15:58:30', '2024-11-23 16:08:30'),
(65, '1234567891', '779538', '2024-11-23 16:01:48', '2024-11-23 16:11:48'),
(66, '1234567891', '178153', '2024-11-23 16:01:52', '2024-11-23 16:11:52'),
(67, '1234567891', '155414', '2024-11-23 16:01:59', '2024-11-23 16:11:59'),
(68, '1234567891', '603088', '2024-11-23 16:02:29', '2024-11-23 16:12:29'),
(69, '1234567891', '353144', '2024-11-23 16:02:32', '2024-11-23 16:12:32'),
(70, '1234567891', '830071', '2024-11-23 16:02:43', '2024-11-23 16:12:43'),
(71, '1234567891', '704466', '2024-11-23 16:03:49', '2024-11-23 16:13:49'),
(72, '1234567891', '819843', '2024-11-23 17:19:52', '2024-11-23 17:29:52'),
(73, '1234567891', '826811', '2024-11-23 17:31:06', '2024-11-23 17:41:06'),
(74, '1234567891', '376926', '2024-11-23 17:33:46', '2024-11-23 17:43:46'),
(75, '8127902535', '734068', '2024-11-23 17:59:15', '2024-11-23 18:09:15'),
(76, '8127902535', '250281', '2024-11-23 17:59:48', '2024-11-23 18:09:48'),
(77, '8127902535', '563817', '2024-11-23 18:22:50', '2024-11-23 18:32:50'),
(78, '8127902535', '473589', '2024-11-23 18:27:32', '2024-11-23 18:37:32'),
(79, '8127902535', '675861', '2024-11-23 18:35:30', '2024-11-23 18:45:30'),
(80, '8127902535', '740699', '2024-11-23 18:40:53', '2024-11-23 18:50:53'),
(81, '8127902535', '780472', '2024-11-23 21:36:43', '2024-11-23 21:46:43'),
(82, '8127902535', '883912', '2024-11-23 21:55:04', '2024-11-23 22:05:04'),
(83, '8127902535', '213246', '2024-11-23 22:01:36', '2024-11-23 22:11:36'),
(84, '8127902535', '735621', '2024-11-23 22:01:56', '2024-11-23 22:11:56'),
(85, '8127902535', '116404', '2024-11-23 22:06:23', '2024-11-23 22:16:23'),
(86, '8127902535', '409672', '2024-11-23 22:06:59', '2024-11-23 22:16:59'),
(87, '1234567891', '621743', '2024-12-11 08:28:25', '2024-12-11 08:38:25');

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

--
-- Table structure for table `reels`
--

CREATE TABLE `reels` (
  `reel_id` int NOT NULL,
  `reel_link` varchar(255) NOT NULL,
  `category_id` int NOT NULL,
  `caption` varchar(255) NOT NULL,
  `user_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `reels`
--

INSERT INTO `reels` (`reel_id`, `reel_link`, `category_id`, `caption`, `user_id`) VALUES
(1, '1', 1, 'This is caption for reel 1', 1),
(2, '2', 2, 'This is caption for reel 2', 2),
(3, '3', 3, 'This is caption for reel 3', 3),
(4, '4', 4, 'This is caption for reel 4', 4),
(5, '5', 5, 'This is caption for reel 5', 5),
(6, '6', 6, 'This is caption for reel 6', 6),
(7, '7', 7, 'This is caption for reel 7', 7),
(8, '8', 8, 'This is caption for reel 8', 8),
(9, '9', 9, 'This is caption for reel 9', 9),
(10, '10', 10, 'This is caption for reel 10', 10),
(11, '11', 11, 'This is caption for reel 11', 11),
(12, '12', 12, 'This is caption for reel 12', 12),
(13, '13', 13, 'This is caption for reel 13', 13),
(14, '14', 14, 'This is caption for reel 14', 14),
(15, '15', 15, 'This is caption for reel 15', 15),
(16, '16', 16, 'This is caption for reel 16', 16),
(17, '17', 17, 'This is caption for reel 17', 17),
(18, '18', 18, 'This is caption for reel 18', 18),
(19, '19', 19, 'This is caption for reel 19', 19),
(20, '20', 20, 'This is caption for reel 20', 20),
(21, '21', 1, 'This is caption for reel 21', 21),
(22, '22', 1, 'This is caption for reel 22', 21),
(23, '23', 1, 'This is caption for reel 23', 21),
(24, '24', 2, 'This is caption for reel 24', 21),
(25, '25', 2, 'This is caption for reel 25', 21),
(26, '26', 2, 'This is caption for reel 26', 26),
(27, '27', 3, 'This is caption for reel 27', 27),
(28, '28', 3, 'This is caption for reel 28', 28),
(29, '29', 3, 'This is caption for reel 29', 29),
(30, '30', 1, 'This is caption for reel 30', 30),
(31, '31', 1, 'This is caption for reel 31', 31),
(32, '32', 1, 'This is caption for reel 32', 32),
(33, '33', 2, 'This is caption for reel 33', 33),
(34, '34', 2, 'This is caption for reel 34', 34),
(35, '35', 2, 'This is caption for reel 35', 35),
(36, '36', 3, 'This is caption for reel 36', 36),
(37, '37', 3, 'This is caption for reel 37', 37),
(38, '38', 3, 'This is caption for reel 38', 38),
(39, '39', 1, 'This is caption for reel 39', 39),
(40, '40', 1, 'This is caption for reel 40', 40),
(45, '1732275307_Video-469.mp4', 12, 'Gaming Reel', 23);

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `password` varchar(255) NOT NULL,
  `is_verified` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `gender` varchar(10) DEFAULT NULL,
  `profile_pic` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `mobile`, `password`, `is_verified`, `created_at`, `name`, `email`, `gender`, `profile_pic`) VALUES
(1, '9876543210', 'password1', 0, '2024-11-22 05:11:31', 'Varun', 'vs@gmail.com', 'Male', '/home/diginspire/works.diginspire.in/reel/api/pfp/1732278396_wallpaperflare.com_wallpaper.jpg'),
(2, '9876543211', 'password2', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(3, '1234567890', '$2y$10$/jycXB9PheydYXwep/D8I.Qb8wxe9uU0KqULPXn50G/Zv6mfAR2hy', 0, '2024-11-21 09:35:56', NULL, NULL, NULL, NULL),
(4, '9876543213', 'password4', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(5, '9876543214', 'password5', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(6, '9876543215', 'password6', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(7, '9876543216', 'password7', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(8, '9876543217', 'password8', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(9, '9876543218', 'password9', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(10, '9876543219', 'password10', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(11, '9876543220', 'password11', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(12, '9876543221', 'password12', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(13, '9876543222', 'password13', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(14, '9876543223', 'password14', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(15, '9876543224', 'password15', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(16, '9876543225', 'password16', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(17, '9876543226', 'password17', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(18, '9876543227', 'password18', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(19, '9876543228', 'password19', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(20, '9876543229', 'password20', 0, '2024-11-22 05:11:31', NULL, NULL, NULL, NULL),
(21, '1234567891', 'password23', 0, '2024-11-22 05:14:00', NULL, NULL, NULL, NULL),
(22, '1234567892', 'password23', 0, '2024-11-22 21:45:06', NULL, NULL, NULL, NULL),
(23, '8127902535', '1234567', 0, '2024-11-23 17:59:15', 'nzsn', 'snsnsn', 'snsnsn', NULL);

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

--
-- Table structure for table `user_categories`
--

CREATE TABLE `user_categories` (
  `user_id` int NOT NULL,
  `category_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `user_categories`
--

INSERT INTO `user_categories` (`user_id`, `category_id`) VALUES
(1, 1),
(3, 1),
(20, 1),
(23, 1),
(1, 2),
(3, 2),
(20, 2),
(23, 2),
(1, 3),
(3, 3),
(20, 3),
(1, 4),
(2, 4),
(23, 4),
(2, 5),
(23, 5),
(23, 6),
(4, 8),
(1, 9),
(4, 9),
(5, 10),
(23, 10),
(1, 11),
(5, 11),
(21, 11),
(23, 11),
(6, 12),
(23, 12),
(7, 13),
(7, 14),
(23, 14),
(8, 15),
(23, 15),
(8, 16),
(23, 16),
(9, 17),
(21, 17),
(23, 17),
(1, 18),
(9, 18),
(23, 18),
(10, 19),
(23, 19),
(10, 20),
(21, 20),
(23, 20);

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

--
-- Table structure for table `user_reel_likes`
--

CREATE TABLE `user_reel_likes` (
  `user_id` int NOT NULL,
  `reel_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `user_reel_likes`
--

INSERT INTO `user_reel_likes` (`user_id`, `reel_id`, `created_at`) VALUES
(1, 1, '2024-11-22 05:12:58'),
(1, 2, '2024-11-22 05:12:58'),
(2, 3, '2024-11-22 05:12:58'),
(2, 4, '2024-11-22 05:12:58'),
(3, 5, '2024-11-22 05:12:58'),
(4, 6, '2024-11-22 05:12:58'),
(4, 7, '2024-11-22 05:12:58'),
(5, 8, '2024-11-22 05:12:58'),
(5, 9, '2024-11-22 05:12:58'),
(6, 10, '2024-11-22 05:12:58'),
(6, 11, '2024-11-22 05:12:58'),
(7, 12, '2024-11-22 05:12:58'),
(7, 13, '2024-11-22 05:12:58'),
(8, 14, '2024-11-22 05:12:58'),
(8, 15, '2024-11-22 05:12:58'),
(9, 16, '2024-11-22 05:12:58'),
(9, 17, '2024-11-22 05:12:58'),
(10, 18, '2024-11-22 05:12:58'),
(10, 19, '2024-11-22 05:12:58'),
(11, 20, '2024-11-22 05:12:58'),
(20, 1, '2024-11-22 05:37:12'),
(20, 5, '2024-11-22 05:36:35');

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `reels`
--
ALTER TABLE `reels`
  ADD PRIMARY KEY (`reel_id`),
  ADD KEY `category_id` (`category_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `mobile` (`mobile`);

--
-- Indexes for table `user_categories`
--
ALTER TABLE `user_categories`
  ADD PRIMARY KEY (`user_id`,`category_id`),
  ADD KEY `category_id` (`category_id`);

--
-- Indexes for table `user_reel_likes`
--
ALTER TABLE `user_reel_likes`
  ADD PRIMARY KEY (`user_id`,`reel_id`),
  ADD KEY `reel_id` (`reel_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `otps`
--
ALTER TABLE `otps`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=88;

--
-- AUTO_INCREMENT for table `reels`
--
ALTER TABLE `reels`
  MODIFY `reel_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `reels`
--
ALTER TABLE `reels`
  ADD CONSTRAINT `reels_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_categories`
--
ALTER TABLE `user_categories`
  ADD CONSTRAINT `user_categories_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `user_categories_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`);

--
-- Constraints for table `user_reel_likes`
--
ALTER TABLE `user_reel_likes`
  ADD CONSTRAINT `user_reel_likes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_reel_likes_ibfk_2` FOREIGN KEY (`reel_id`) REFERENCES `reels` (`reel_id`) ON DELETE CASCADE;
COMMIT;

/*!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 */;
