text: -- phpMyAdmin SQL Dump
  -- version 4.5.1
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: Oct 14, 2016 at 10:50 PM
  -- Server version: 10.1.16-MariaDB
  -- PHP Version: 7.0.9
  
  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: `paper_system`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mcqs`
  --
  
  CREATE TABLE `mcqs` (
    `id` int(10) UNSIGNED NOT NULL,
    `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `optionA` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `optionB` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `optionC` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `optionD` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `answer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `test_cate_id` int(11) NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_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, '2016_10_13_162033_create_mcqs_table', 2),
  (4, '2016_10_13_163209_create_result_table', 2),
  (5, '2016_10_13_163250_create_roles_table', 3),
  (6, '2016_10_13_163356_create_test_master_table', 3),
  (7, '2016_10_13_163442_create_test_detail_table', 3),
  (8, '2016_10_13_190454_create_test_category_table', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `result`
  --
  
  CREATE TABLE `result` (
    `result_id` int(10) UNSIGNED NOT NULL,
    `users_id` int(11) NOT NULL,
    `obtain_marks` int(11) NOT NULL,
    `max_marks` int(11) NOT NULL,
    `right_questions` int(11) NOT NULL,
    `wrong_questions` int(11) NOT NULL,
    `unattempt_question` int(11) NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `roles_id` int(10) UNSIGNED NOT NULL,
    `roles_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `active` tinyint(4) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `testcategory`
  --
  
  CREATE TABLE `testcategory` (
    `test_cate_id` int(10) UNSIGNED NOT NULL,
    `no_of_categories` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `testdetail`
  --
  
  CREATE TABLE `testdetail` (
    `id` int(10) UNSIGNED NOT NULL,
    `test_master_id` int(11) NOT NULL,
    `answer_marked_by_student` int(11) NOT NULL,
    `mcqs_id` int(11) NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `testmaster`
  --
  
  CREATE TABLE `testmaster` (
    `id` int(10) UNSIGNED NOT NULL,
    `users_id` int(11) NOT NULL,
    `test_cate_id` int(11) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `mcqs`
  --
  ALTER TABLE `mcqs`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `mcqs_id_unique` (`id`),
    ADD KEY `mcqs_test_cate_id_index` (`test_cate_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`),
    ADD KEY `password_resets_token_index` (`token`);
  
  --
  -- Indexes for table `result`
  --
  ALTER TABLE `result`
    ADD PRIMARY KEY (`result_id`),
    ADD UNIQUE KEY `result_result_id_unique` (`result_id`),
    ADD KEY `result_users_id_index` (`users_id`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`roles_id`),
    ADD UNIQUE KEY `roles_roles_id_unique` (`roles_id`);
  
  --
  -- Indexes for table `testcategory`
  --
  ALTER TABLE `testcategory`
    ADD PRIMARY KEY (`test_cate_id`),
    ADD UNIQUE KEY `testcategory_test_cate_id_unique` (`test_cate_id`);
  
  --
  -- Indexes for table `testdetail`
  --
  ALTER TABLE `testdetail`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `testdetail_id_unique` (`id`),
    ADD KEY `testdetail_test_master_id_index` (`test_master_id`),
    ADD KEY `testdetail_mcqs_id_index` (`mcqs_id`);
  
  --
  -- Indexes for table `testmaster`
  --
  ALTER TABLE `testmaster`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `testmaster_id_unique` (`id`),
    ADD KEY `testmaster_users_id_index` (`users_id`),
    ADD KEY `testmaster_test_cate_id_index` (`test_cate_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 `mcqs`
  --
  ALTER TABLE `mcqs`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  --
  -- AUTO_INCREMENT for table `result`
  --
  ALTER TABLE `result`
    MODIFY `result_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
    MODIFY `roles_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `testcategory`
  --
  ALTER TABLE `testcategory`
    MODIFY `test_cate_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `testdetail`
  --
  ALTER TABLE `testdetail`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `testmaster`
  --
  ALTER TABLE `testmaster`
    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;
  /*!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 */;
  