CREATE DATABASE  IF NOT EXISTS `subscribe` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `subscribe`;
--
-- Host: 127.0.0.1    Database: subscribe
-- ------------------------------------------------------


--
-- Table structure for table `Files`
--

CREATE TABLE `Files` (
  `id_file` int NOT NULL AUTO_INCREMENT,
  `video_path` varchar(500) DEFAULT NULL,
  `id_user` int DEFAULT NULL,
  `duration` varchar(50) DEFAULT NULL,
  `extension` varchar(50) DEFAULT NULL,
  `when_uploaded` varchar(200) DEFAULT NULL,
  `size` varchar(50) DEFAULT NULL,
  `multi_speaker` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id_file`),
  KEY `id_user` (`id_user`),
  CONSTRAINT `Files_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `Users` (`id_user`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `Files`
--

INSERT INTO `Files` VALUES (1,'multi_actors.mp4',NULL,'','mp4','2023-03-07 15:35:53','',''),(2,'multi_actors.mp4',NULL,'','mp4','2023-03-08 10:54:36','',''),(3,'test.mp4',NULL,'','mp4','2023-03-08 14:11:16','',''),(4,'cnn.mp4',NULL,'','mp4','2023-03-08 14:53:13','',''),(5,'multi_actors.mp4',NULL,'','mp4','2023-03-09 10:20:41','',''),(6,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-09 16:17:15','',''),(7,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-09 16:18:18','',''),(8,'media/test.mp4',NULL,'172.48','mp4','2023-03-10 14:49:38','',''),(9,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-12 12:54:42','',''),(10,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-12 13:40:41','',''),(11,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-12 13:42:56','',''),(12,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-12 13:47:39','',''),(13,'media/cnn.mp4',NULL,'168.93','mp4','2023-03-12 13:48:50','',''),(14,'cnn.mp4',NULL,'168.93','mp4','2023-03-12 14:13:40','','');

--
-- Table structure for table `Users`
--

CREATE TABLE `Users` (
  `id_user` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `last_time` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id_user`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `Users`
--

INSERT INTO `Users` VALUES (1,'userdemo','passdemo','2023-02-25 14:20:00'),(2,'username','password','2023-02-15 08:15:00'),(3,'amine','azizi','2023-03-12 14:13:34');

--
-- Table structure for table `auth_group`
--

CREATE TABLE `auth_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_group`
--


--
-- Table structure for table `auth_group_permissions`
--

CREATE TABLE `auth_group_permissions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_id` int NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
  KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
  CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_group_permissions`
--


--
-- Table structure for table `auth_permission`
--

CREATE TABLE `auth_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `content_type_id` int NOT NULL,
  `codename` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
  CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_permission`
--

INSERT INTO `auth_permission` VALUES (1,'Can add files',1,'add_files'),(2,'Can change files',1,'change_files'),(3,'Can delete files',1,'delete_files'),(4,'Can view files',1,'view_files'),(5,'Can add users',2,'add_users'),(6,'Can change users',2,'change_users'),(7,'Can delete users',2,'delete_users'),(8,'Can view users',2,'view_users'),(9,'Can add log entry',3,'add_logentry'),(10,'Can change log entry',3,'change_logentry'),(11,'Can delete log entry',3,'delete_logentry'),(12,'Can view log entry',3,'view_logentry'),(13,'Can add permission',4,'add_permission'),(14,'Can change permission',4,'change_permission'),(15,'Can delete permission',4,'delete_permission'),(16,'Can view permission',4,'view_permission'),(17,'Can add group',5,'add_group'),(18,'Can change group',5,'change_group'),(19,'Can delete group',5,'delete_group'),(20,'Can view group',5,'view_group'),(21,'Can add user',6,'add_user'),(22,'Can change user',6,'change_user'),(23,'Can delete user',6,'delete_user'),(24,'Can view user',6,'view_user'),(25,'Can add content type',7,'add_contenttype'),(26,'Can change content type',7,'change_contenttype'),(27,'Can delete content type',7,'delete_contenttype'),(28,'Can view content type',7,'view_contenttype'),(29,'Can add session',8,'add_session'),(30,'Can change session',8,'change_session'),(31,'Can delete session',8,'delete_session'),(32,'Can view session',8,'view_session'),(33,'Can add video',9,'add_video'),(34,'Can change video',9,'change_video'),(35,'Can delete video',9,'delete_video'),(36,'Can view video',9,'view_video');

--
-- Table structure for table `auth_user`
--

CREATE TABLE `auth_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `password` varchar(128) NOT NULL,
  `last_login` datetime(6) DEFAULT NULL,
  `is_superuser` tinyint(1) NOT NULL,
  `username` varchar(150) NOT NULL,
  `first_name` varchar(30) NOT NULL,
  `last_name` varchar(150) NOT NULL,
  `email` varchar(254) NOT NULL,
  `is_staff` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `date_joined` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_user`
--


--
-- Table structure for table `auth_user_groups`
--

CREATE TABLE `auth_user_groups` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `group_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`),
  KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`),
  CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
  CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_user_groups`
--


--
-- Table structure for table `auth_user_user_permissions`
--

CREATE TABLE `auth_user_user_permissions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`),
  KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`),
  CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_user_user_permissions`
--


--
-- Table structure for table `django_admin_log`
--

CREATE TABLE `django_admin_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `action_time` datetime(6) NOT NULL,
  `object_id` longtext,
  `object_repr` varchar(200) NOT NULL,
  `action_flag` smallint unsigned NOT NULL,
  `change_message` longtext NOT NULL,
  `content_type_id` int DEFAULT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`),
  KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`),
  CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_admin_log`
--


--
-- Table structure for table `django_content_type`
--

CREATE TABLE `django_content_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `app_label` varchar(100) NOT NULL,
  `model` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_content_type`
--

INSERT INTO `django_content_type` VALUES (3,'admin','logentry'),(5,'auth','group'),(4,'auth','permission'),(6,'auth','user'),(7,'contenttypes','contenttype'),(1,'interface','files'),(2,'interface','users'),(9,'interface','video'),(8,'sessions','session');

--
-- Table structure for table `django_migrations`
--

CREATE TABLE `django_migrations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `app` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `applied` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_migrations`
--

INSERT INTO `django_migrations` VALUES (1,'sessions','0001_initial','2023-03-07 13:50:58.362195'),(2,'contenttypes','0001_initial','2023-03-08 14:51:38.634732'),(3,'auth','0001_initial','2023-03-08 14:51:40.946886'),(4,'admin','0001_initial','2023-03-08 14:51:49.221921'),(5,'admin','0002_logentry_remove_auto_add','2023-03-08 14:51:51.080549'),(6,'admin','0003_logentry_add_action_flag_choices','2023-03-08 14:51:51.140045'),(7,'contenttypes','0002_remove_content_type_name','2023-03-08 14:51:52.073970'),(8,'auth','0002_alter_permission_name_max_length','2023-03-08 14:51:53.095350'),(9,'auth','0003_alter_user_email_max_length','2023-03-08 14:51:53.465306'),(10,'auth','0004_alter_user_username_opts','2023-03-08 14:51:53.556040'),(11,'auth','0005_alter_user_last_login_null','2023-03-08 14:51:54.373517'),(12,'auth','0006_require_contenttypes_0002','2023-03-08 14:51:54.435865'),(13,'auth','0007_alter_validators_add_error_messages','2023-03-08 14:51:54.511421'),(14,'auth','0008_alter_user_username_max_length','2023-03-08 14:51:55.563599'),(15,'auth','0009_alter_user_last_name_max_length','2023-03-08 14:51:56.684888'),(16,'auth','0010_alter_group_name_max_length','2023-03-08 14:51:56.905070'),(17,'auth','0011_update_proxy_permissions','2023-03-08 14:51:56.985763'),(18,'auth','0012_alter_user_first_name_max_length','2023-03-08 14:51:58.067781'),(19,'auth','0013_auto_20230308_1451','2023-03-08 14:51:59.062441'),(20,'interface','0001_initial','2023-03-08 14:51:59.135934'),(21,'interface','0002_video','2023-03-09 11:29:11.590768');

--
-- Table structure for table `django_session`
--

CREATE TABLE `django_session` (
  `session_key` varchar(40) NOT NULL,
  `session_data` longtext NOT NULL,
  `expire_date` datetime(6) NOT NULL,
  PRIMARY KEY (`session_key`),
  KEY `django_session_expire_date_a5c62663` (`expire_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_session`
--

INSERT INTO `django_session` VALUES ('as10bi98bpamwrxxf47hg07r527nf16k','YTk4YjIwNzcyYjJmNDA0MzkzMGIyNjYwZmI1YzkyYWQ5NjFjODFlZTp7ImlzbG9nZ2VkIjoieWVzIiwiaWRfdXNlciI6IjMifQ==','2023-03-26 14:13:34.201196');

--
-- Table structure for table `interface_video`
--

CREATE TABLE `interface_video` (
  `id` int NOT NULL AUTO_INCREMENT,
  `caption` varchar(100) NOT NULL,
  `video` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `interface_video`
--


--
-- Dumping events for database 'subscribe'
--

--
-- Dumping routines for database 'subscribe'
--


