text: -- phpMyAdmin SQL Dump
  -- version 4.9.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Apr 22, 2020 at 10:09 PM
  -- Server version: 10.4.11-MariaDB
  -- PHP Version: 7.2.26
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  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: `angrynerdsmaster`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `courses`
  --
  
  CREATE TABLE `courses` (
    `id` int(11) NOT NULL,
    `code` varchar(20) NOT NULL,
    `description` varchar(200) NOT NULL,
    `image` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `courses`
  --
  
  INSERT INTO `courses` (`id`, `code`, `description`, `image`) VALUES
  (1, 'ICS-325-A', 'Biology is the natural science that studies life and living organisms. Physical structure, development, and evolution.', 'biology.png'),
  (2, 'ICS 325-C', 'Archaeology, or archeology, is the professional study of human activity through the recovery and analysis of material culture.', 'Archaeology.png');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(11) NOT NULL,
    `fname` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `lname` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `email` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `pass` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `admin` tinyint(1) DEFAULT 0,
    `last_log_in` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `active` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `notes` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `fname`, `lname`, `email`, `pass`, `admin`, `last_log_in`, `active`, `notes`) VALUES
  (1, 'Johnny', 'Appleseed', 'someone@example.com', 'abc123', 1, '2020-04-22 20:08:58', 'yes', 'Just some guy with a lot of work to do.');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_course`
  --
  
  CREATE TABLE `user_course` (
    `id` int(11) NOT NULL,
    `course_id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_course`
  --
  
  INSERT INTO `user_course` (`id`, `course_id`, `user_id`) VALUES
  (1, 1, 1),
  (2, 2, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_post`
  --
  
  CREATE TABLE `user_post` (
    `id` int(11) NOT NULL,
    `title` varchar(150) NOT NULL,
    `content` varchar(1000) NOT NULL,
    `created_date` datetime NOT NULL DEFAULT current_timestamp(),
    `user_id` int(11) NOT NULL,
    `course_id` int(11) NOT NULL,
    `image` varchar(250) NOT NULL DEFAULT 'ImageNotFound.png'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_post`
  --
  
  INSERT INTO `user_post` (`id`, `title`, `content`, `created_date`, `user_id`, `course_id`, `image`) VALUES
  (1, 'My First Post', 'Some really interesting user content. Some really interesting user content. Some really interesting user content. Some really interesting user content.', '2020-04-04 16:03:25', 1, 2, 'cat.jpg'),
  (2, 'The Empire Strikes Back', 'The adventure continues in this \"Star Wars\" sequel. Luke Skywalker (Mark Hamill), Han Solo (Harrison Ford), Princess Leia (Carrie Fisher) and Chewbacca (Peter Mayhew) face attack by the Imperial forces and its AT-AT walkers on the ice planet Hoth. ', '2020-04-13 11:37:36', 1, 2, 'ImageNotFound.png'),
  (4, 'Revenge of the Sith', 't has been three years since the Clone Wars began. Jedi Master Obi-Wan Kenobi (Ewan McGregor) and Jedi Knight Anakin Skywalker (Hayden Christensen) rescue Chancellor Palpatine (Ian McDiarmid) from General Grievous, the commander of the droid armies, but Grievous escapes.', '2020-04-13 19:36:00', 1, 2, 'tree.jpg');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_post_comment`
  --
  
  CREATE TABLE `user_post_comment` (
    `id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL,
    `user_post_id` int(11) NOT NULL,
    `content` varchar(250) NOT NULL,
    `created_date` datetime NOT NULL DEFAULT current_timestamp()
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `user_post_comment`
  --
  
  INSERT INTO `user_post_comment` (`id`, `user_id`, `user_post_id`, `content`, `created_date`) VALUES
  (1, 1, 1, 'This is the first user comment to ever be loaded from the DB! Here\'s to many more.', '2020-04-13 11:52:43'),
  (3, 1, 1, 'Test', '2020-04-13 17:22:06'),
  (10, 1, 1, 'This is really cool!', '2020-04-13 17:31:53'),
  (13, 1, 2, 'Luke Skywalker FTW!', '2020-04-13 17:41:22'),
  (19, 1, 4, 'TOTS my fav :D', '2020-04-13 19:45:59'),
  (20, 1, 4, 'TOTS my fav :D', '2020-04-13 19:56:42');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `courses`
  --
  ALTER TABLE `courses`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_course`
  --
  ALTER TABLE `user_course`
    ADD PRIMARY KEY (`id`),
    ADD KEY `course_id` (`course_id`),
    ADD KEY `user_id` (`user_id`);
  
  --
  -- Indexes for table `user_post`
  --
  ALTER TABLE `user_post`
    ADD PRIMARY KEY (`id`),
    ADD KEY `created_by` (`user_id`);
  
  --
  -- Indexes for table `user_post_comment`
  --
  ALTER TABLE `user_post_comment`
    ADD PRIMARY KEY (`id`),
    ADD KEY `user_id` (`user_id`),
    ADD KEY `user_post_id` (`user_post_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `courses`
  --
  ALTER TABLE `courses`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `user_course`
  --
  ALTER TABLE `user_course`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `user_post`
  --
  ALTER TABLE `user_post`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  
  --
  -- AUTO_INCREMENT for table `user_post_comment`
  --
  ALTER TABLE `user_post_comment`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
  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 */;
  