text: -- phpMyAdmin SQL Dump
  -- version 4.7.0
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Apr 20, 2018 at 08:03 AM
  -- Server version: 10.1.22-MariaDB
  -- PHP Version: 7.1.4
  
  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: `pmanager`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `comments`
  --
  
  CREATE TABLE `comments` (
    `id` int(10) UNSIGNED NOT NULL,
    `body` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `commentable_id` int(10) UNSIGNED NOT NULL,
    `commentable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `comments`
  --
  
  INSERT INTO `comments` (`id`, `body`, `url`, `user_id`, `commentable_id`, `commentable_type`, `created_at`, `updated_at`) VALUES
  (1, 'efeef', 'rferfer', 3, 4, 'Project', '2018-02-08 12:18:10', '2018-02-08 12:18:10'),
  (2, 'ryd7fyki', 'ctfyu', 3, 4, 'App\\Project', '2018-02-08 13:32:06', '2018-02-08 13:32:06'),
  (3, 'rdxrdyjfc', 'cyjfu', 3, 4, 'App\\Project', '2018-02-08 13:32:51', '2018-02-08 13:32:51'),
  (4, 'yjcutft App\\Project', 'youtube.com', 3, 4, 'App\\Project', '2018-02-08 13:36:38', '2018-02-08 13:36:38'),
  (5, 'Thsi is latest comment App\\Project property set', 'www.youtube.com', 3, 4, 'App\\Project', '2018-02-08 13:37:56', '2018-02-08 13:37:56'),
  (6, 'ffr4f', 'rfrf', 3, 5, 'App\\Project', '2018-02-08 14:17:08', '2018-02-08 14:17:08'),
  (7, 'rfrf', 'frfr', 3, 5, 'App\\Project', '2018-02-08 14:17:14', '2018-02-08 14:17:14'),
  (8, 'tgohi', NULL, 3, 4, 'App\\Project', '2018-02-09 03:32:38', '2018-02-09 03:32:38'),
  (9, 'dewdwed', 'cdc', 4, 7, 'App\\Project', '2018-02-09 10:33:53', '2018-02-09 10:33:53'),
  (10, 'ccd', 'vdcd', 4, 7, 'App\\Project', '2018-02-09 10:34:00', '2018-02-09 10:34:00'),
  (11, 't4rfrftgtrg', 'vfgtbtyy', 4, 9, 'App\\Project', '2018-02-10 01:13:30', '2018-02-10 01:13:30'),
  (12, 'gbgbgb', 'bghbghbg', 4, 9, 'App\\Project', '2018-02-10 01:13:34', '2018-02-10 01:13:34'),
  (13, 'dwdasdad', 'dfsfsf', 3, 10, 'App\\Project', '2018-02-25 13:56:33', '2018-02-25 13:56:33'),
  (14, 'dsfsad', 'fasdfas', 3, 10, 'App\\Project', '2018-02-25 13:56:39', '2018-02-25 13:56:39');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `departments`
  --
  
  CREATE TABLE `departments` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` longtext COLLATE utf8mb4_unicode_ci,
    `user_id` int(10) UNSIGNED NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `departments`
  --
  
  INSERT INTO `departments` (`id`, `name`, `description`, `user_id`, `created_at`, `updated_at`) VALUES
  (9, 'CSE!!', 'This is SUST CSE', 2, '2018-02-05 18:00:00', '2018-02-06 11:25:16'),
  (11, 'CEE', 'This is Civil', 3, '2018-02-06 11:40:25', '2018-02-06 11:40:25'),
  (12, 'EEE', 'EEE SUST', 3, '2018-02-06 14:09:01', '2018-02-06 14:09:01'),
  (15, 'Architecture', 'This is Archi', 3, '2018-02-08 11:07:50', '2018-02-08 11:07:50'),
  (16, 'CSE!', 'Computer Science and Enginnering', 4, '2018-02-09 10:28:21', '2018-02-09 10:36:34');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `migrations`
  --
  
  INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  (1, '2014_10_12_000000_create_users_table', 1),
  (2, '2014_10_12_100000_create_password_resets_table', 1),
  (3, '2018_02_04_072111_create_departments_table', 1),
  (4, '2018_02_04_072701_create_projects_table', 1),
  (5, '2018_02_04_073914_create_tasks_table', 1),
  (6, '2018_02_04_080552_create_comments_table', 1),
  (7, '2018_02_04_082204_create_roles_table', 1),
  (8, '2018_02_04_160520_create_project_user_table', 1),
  (9, '2018_02_04_161212_create_task_user_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `password_resets`
  --
  
  INSERT INTO `password_resets` (`email`, `token`, `created_at`) VALUES
  ('arif.islam.j@gmail.com', '$2y$10$u4QnqbfTrcxx6LK6PRtBvuwnA3H4/Xxfe7miGjK.rs2dPQBSpBmxC', '2018-02-05 12:13:32');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `projects`
  --
  
  CREATE TABLE `projects` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` longtext COLLATE utf8mb4_unicode_ci,
    `department_id` int(10) UNSIGNED DEFAULT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `days` int(10) UNSIGNED DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `projects`
  --
  
  INSERT INTO `projects` (`id`, `name`, `description`, `department_id`, `user_id`, `days`, `created_at`, `updated_at`) VALUES
  (1, 'Attendence System', 'It is automated attendence system', 9, 2, 10, '2018-02-05 18:00:00', NULL),
  (2, 'Project Management', 'It\'s cool', 9, 2, 12, '2018-02-05 18:00:00', NULL),
  (4, 'Abgdyef', 'ffwefe', NULL, 3, NULL, '2018-02-08 11:24:03', '2018-02-08 11:24:03'),
  (5, 'AUtomated', 'COOL', NULL, 3, NULL, '2018-02-08 13:18:14', '2018-02-08 13:18:14'),
  (6, 'Helllo', 'rdifo', NULL, 3, NULL, '2018-02-08 13:28:26', '2018-02-08 13:28:26'),
  (7, 'QA system!!', 'This is question Answering System', NULL, 4, NULL, '2018-02-09 10:29:09', '2018-02-09 10:48:02'),
  (8, 'Attendence Sytem', 'This is Automated attendence System', NULL, 4, NULL, '2018-02-09 10:29:44', '2018-02-09 10:29:44'),
  (9, 'Sylhet Rent', 'Rent', NULL, 4, NULL, '2018-02-10 01:13:16', '2018-02-10 01:13:16'),
  (10, 'Att', 'dsdfefe', NULL, 3, NULL, '2018-02-25 13:56:01', '2018-02-25 13:56:01');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `project_user`
  --
  
  CREATE TABLE `project_user` (
    `id` int(10) UNSIGNED NOT NULL,
    `project_id` int(10) UNSIGNED NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `project_user`
  --
  
  INSERT INTO `project_user` (`id`, `project_id`, `user_id`, `created_at`, `updated_at`) VALUES
  (1, 1, 3, NULL, NULL),
  (2, 7, 3, NULL, NULL),
  (3, 9, 3, NULL, NULL),
  (4, 10, 2, NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `roles`
  --
  
  INSERT INTO `roles` (`id`, `name`, `created_at`, `updated_at`) VALUES
  (1, 'Admin', NULL, NULL),
  (2, 'moderators', NULL, NULL),
  (3, 'user', NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tasks`
  --
  
  CREATE TABLE `tasks` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `project_id` int(10) UNSIGNED NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `days` int(10) UNSIGNED DEFAULT NULL,
    `hours` int(10) UNSIGNED DEFAULT NULL,
    `department_id` int(10) UNSIGNED DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `task_user`
  --
  
  CREATE TABLE `task_user` (
    `id` int(10) UNSIGNED NOT NULL,
    `project_id` int(10) UNSIGNED NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `task_id` int(10) UNSIGNED NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `middle_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `role_id` int(10) UNSIGNED DEFAULT '3'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `password`, `remember_token`, `created_at`, `updated_at`, `first_name`, `middle_name`, `last_name`, `city`, `role_id`) VALUES
  (2, 'Ariful Islam', 'arif.islam.j@gmail.com', '$2y$10$LAwequxCJO44CopE3JbHoO1YeuvVr5Oa3Ff0Dri5RMyRfAV2zH0De', 'ZnwRsWgn2EGY2PRacuz5Pk908ByZIkNfvV8jPHulWPc1qu4tO5GD9AjWsaGt', '2018-02-05 12:29:19', '2018-02-05 12:29:19', NULL, NULL, NULL, NULL, 1),
  (3, 'Nirbak Balok', 'nirbakbalok8@gmail.com', '$2y$10$hZIBnLrzTEuRj/.DEPmCZOzF3DklTQTrioeGr1/Tt2AuPYBqKRrh.', 'ATU2ZxCgMi4SdWIKKhuq8OMJitZ1y8GZccCAam9yz7p0Aj5XfFF3PMksWTBV', '2018-02-06 11:39:51', '2018-02-06 11:39:51', NULL, NULL, NULL, NULL, 3),
  (4, 'Tonmoy', 'tonmoy.tonmoy@gmail.com', '$2y$10$UeiEYHnNm038z4WxUOMcW.I3FA18eKp.PMLZYrnL88obBxlM7akF6', 'BdiPBqW7NqKsnUuA7b0wjatC0FfUyRlSbDSvcEovKY9SAPgKvnKYwUAwirBo', '2018-02-09 10:27:56', '2018-02-09 10:27:56', NULL, NULL, NULL, NULL, 3);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `comments`
  --
  ALTER TABLE `comments`
    ADD PRIMARY KEY (`id`),
    ADD KEY `comments_user_id_foreign` (`user_id`);
  
  --
  -- Indexes for table `departments`
  --
  ALTER TABLE `departments`
    ADD PRIMARY KEY (`id`),
    ADD KEY `departments_user_id_foreign` (`user_id`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `projects`
  --
  ALTER TABLE `projects`
    ADD PRIMARY KEY (`id`),
    ADD KEY `projects_user_id_foreign` (`user_id`),
    ADD KEY `projects_department_id_foreign` (`department_id`);
  
  --
  -- Indexes for table `project_user`
  --
  ALTER TABLE `project_user`
    ADD PRIMARY KEY (`id`),
    ADD KEY `project_user_user_id_foreign` (`user_id`),
    ADD KEY `project_user_project_id_foreign` (`project_id`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `tasks`
  --
  ALTER TABLE `tasks`
    ADD PRIMARY KEY (`id`),
    ADD KEY `tasks_user_id_foreign` (`user_id`),
    ADD KEY `tasks_project_id_foreign` (`project_id`),
    ADD KEY `tasks_department_id_foreign` (`department_id`);
  
  --
  -- Indexes for table `task_user`
  --
  ALTER TABLE `task_user`
    ADD PRIMARY KEY (`id`),
    ADD KEY `task_user_user_id_foreign` (`user_id`),
    ADD KEY `task_user_task_id_foreign` (`task_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `comments`
  --
  ALTER TABLE `comments`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
  --
  -- AUTO_INCREMENT for table `departments`
  --
  ALTER TABLE `departments`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  --
  -- AUTO_INCREMENT for table `projects`
  --
  ALTER TABLE `projects`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
  --
  -- AUTO_INCREMENT for table `project_user`
  --
  ALTER TABLE `project_user`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  --
  -- AUTO_INCREMENT for table `tasks`
  --
  ALTER TABLE `tasks`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `task_user`
  --
  ALTER TABLE `task_user`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `comments`
  --
  ALTER TABLE `comments`
    ADD CONSTRAINT `comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `departments`
  --
  ALTER TABLE `departments`
    ADD CONSTRAINT `departments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `projects`
  --
  ALTER TABLE `projects`
    ADD CONSTRAINT `projects_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`),
    ADD CONSTRAINT `projects_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `project_user`
  --
  ALTER TABLE `project_user`
    ADD CONSTRAINT `project_user_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
    ADD CONSTRAINT `project_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `tasks`
  --
  ALTER TABLE `tasks`
    ADD CONSTRAINT `tasks_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`),
    ADD CONSTRAINT `tasks_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
    ADD CONSTRAINT `tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `task_user`
  --
  ALTER TABLE `task_user`
    ADD CONSTRAINT `task_user_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`),
    ADD CONSTRAINT `task_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  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 */;
  