text: -- phpMyAdmin SQL Dump
  -- version 4.6.6deb5
  -- https://www.phpmyadmin.net/
  --
  -- Host: localhost:3306
  -- Generation Time: Mar 13, 2019 at 03:33 PM
  -- Server version: 5.7.25-0ubuntu0.18.04.2
  -- PHP Version: 7.2.15-0ubuntu0.18.04.1
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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: `movie`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `categories`
  --
  
  CREATE TABLE `categories` (
    `categories_id` int(11) NOT NULL,
    `categories_name` varchar(255) NOT NULL,
    `date` date NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `categories`
  --
  
  INSERT INTO `categories` (`categories_id`, `categories_name`, `date`) VALUES
  (1, 'Adventures', '2019-03-13'),
  (2, 'Horror', '2019-03-13');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `comments`
  --
  
  CREATE TABLE `comments` (
    `comment_id` int(11) NOT NULL,
    `description` varchar(255) NOT NULL,
    `comment_user_id` int(11) DEFAULT NULL,
    `comment_star` int(11) NOT NULL,
    `comment_date` date NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `groups`
  --
  
  CREATE TABLE `groups` (
    `id` mediumint(8) UNSIGNED NOT NULL,
    `name` varchar(20) NOT NULL,
    `description` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `groups`
  --
  
  INSERT INTO `groups` (`id`, `name`, `description`) VALUES
  (1, 'admin', 'Administrator'),
  (2, 'members', 'General User');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `login_attempts`
  --
  
  CREATE TABLE `login_attempts` (
    `id` int(11) UNSIGNED NOT NULL,
    `ip_address` varchar(45) NOT NULL,
    `login` varchar(100) NOT NULL,
    `time` int(11) UNSIGNED DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `login_attempts`
  --
  
  INSERT INTO `login_attempts` (`id`, `ip_address`, `login`, `time`) VALUES
  (1, '::1', 'admin', 1552431902),
  (2, '::1', 'admin', 1552431909);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `reviews`
  --
  
  CREATE TABLE `reviews` (
    `id` int(11) NOT NULL,
    `review_name` varchar(255) NOT NULL,
    `review_synopsis` text NOT NULL,
    `review_user_id` int(11) NOT NULL,
    `review_category_id` int(11) NOT NULL,
    `review_date` date NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `reviews`
  --
  
  INSERT INTO `reviews` (`id`, `review_name`, `review_synopsis`, `review_user_id`, `review_category_id`, `review_date`) VALUES
  (1, 'AquaMan', 'Once Home to the most advanced civilization on Earth, the city of Atlantis is now an underwater Kingdom ruled by the power-hungry King Orm. With a vast army at his disposal, Orm plans to conquer the remaining oceanic people and then the surface world. Standing in his way is Aquamna, Orm\'s half human half Atlantean brother.', 1, 1, '2019-03-14'),
  (2, 'Avengers Infinity Wars', 'Iron man, Thor, the Hulk and the rest of the avengers unite to battle their most powerful enemy yet -- the evil Thanos. On a mission to collect all six Infinity Stones, Thanos plans ti use the artifacts to inflict his twisted will on reality. The fate of the planet and the existence itself has never been more uncertain as everything the Avengers have fought for as led to this.', 1, 1, '2019-03-12');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(11) UNSIGNED NOT NULL,
    `ip_address` varchar(45) NOT NULL,
    `username` varchar(100) DEFAULT NULL,
    `password` varchar(255) NOT NULL,
    `email` varchar(254) NOT NULL,
    `activation_selector` varchar(255) DEFAULT NULL,
    `activation_code` varchar(255) DEFAULT NULL,
    `forgotten_password_selector` varchar(255) DEFAULT NULL,
    `forgotten_password_code` varchar(255) DEFAULT NULL,
    `forgotten_password_time` int(11) UNSIGNED DEFAULT NULL,
    `remember_selector` varchar(255) DEFAULT NULL,
    `remember_code` varchar(255) DEFAULT NULL,
    `created_on` int(11) UNSIGNED NOT NULL,
    `last_login` int(11) UNSIGNED DEFAULT NULL,
    `active` tinyint(1) UNSIGNED DEFAULT NULL,
    `first_name` varchar(50) DEFAULT NULL,
    `last_name` varchar(50) DEFAULT NULL,
    `company` varchar(100) DEFAULT NULL,
    `phone` varchar(20) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `ip_address`, `username`, `password`, `email`, `activation_selector`, `activation_code`, `forgotten_password_selector`, `forgotten_password_code`, `forgotten_password_time`, `remember_selector`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`) VALUES
  (1, '127.0.0.1', 'administrator', '$2y$12$.9XjcZh0FTNZtJPBtbGGg.jA2Owa94Tiom49erm8EtEIRdginuBHG', 'admin@admin.com', NULL, '', NULL, NULL, NULL, NULL, NULL, 1268889823, 1552438247, 1, 'Admin', 'istrator', 'ADMIN', '0');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users_groups`
  --
  
  CREATE TABLE `users_groups` (
    `id` int(11) UNSIGNED NOT NULL,
    `user_id` int(11) UNSIGNED NOT NULL,
    `group_id` mediumint(8) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `users_groups`
  --
  
  INSERT INTO `users_groups` (`id`, `user_id`, `group_id`) VALUES
  (1, 1, 1),
  (2, 1, 2);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`categories_id`);
  
  --
  -- Indexes for table `comments`
  --
  ALTER TABLE `comments`
    ADD PRIMARY KEY (`comment_id`);
  
  --
  -- Indexes for table `groups`
  --
  ALTER TABLE `groups`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `login_attempts`
  --
  ALTER TABLE `login_attempts`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `reviews`
  --
  ALTER TABLE `reviews`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `uc_email` (`email`),
    ADD UNIQUE KEY `uc_activation_selector` (`activation_selector`),
    ADD UNIQUE KEY `uc_forgotten_password_selector` (`forgotten_password_selector`),
    ADD UNIQUE KEY `uc_remember_selector` (`remember_selector`);
  
  --
  -- Indexes for table `users_groups`
  --
  ALTER TABLE `users_groups`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
    ADD KEY `fk_users_groups_users1_idx` (`user_id`),
    ADD KEY `fk_users_groups_groups1_idx` (`group_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `categories_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `comments`
  --
  ALTER TABLE `comments`
    MODIFY `comment_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `groups`
  --
  ALTER TABLE `groups`
    MODIFY `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `login_attempts`
  --
  ALTER TABLE `login_attempts`
    MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `reviews`
  --
  ALTER TABLE `reviews`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `users_groups`
  --
  ALTER TABLE `users_groups`
    MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `users_groups`
  --
  ALTER TABLE `users_groups`
    ADD CONSTRAINT `fk_users_groups_groups1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
    ADD CONSTRAINT `fk_users_groups_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
  
  /*!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 */;