Files
004_comission/teddy_y/quotation2/laravel-simple-tryout/php74-httpd/example-app/auschooltest.sql
louiscklaw f08350ff38 update,
2025-01-31 21:12:34 +08:00

607 lines
20 KiB
SQL

-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 17, 2022 at 12:29 PM
-- Server version: 10.4.25-MariaDB
-- PHP Version: 8.0.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `auschooltest`
--
-- --------------------------------------------------------
--
-- Table structure for table `city`
--
CREATE TABLE `city` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`country_id` bigint(20) 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 `city`
--
INSERT INTO `city` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES
(1, 'NSW', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `country`
--
CREATE TABLE `country` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `country`
--
INSERT INTO `country` (`id`, `name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Australia', '2022-11-27 10:43:36', '2022-11-30 13:52:41', NULL),
(2, 'India', '2022-11-27 10:02:08', '2022-11-30 13:38:49', NULL),
(3, 'America', '2022-11-27 10:36:28', '2022-11-30 13:50:47', NULL),
(4, 'UK', '2022-11-27 11:21:00', '2022-12-02 12:32:17', '2022-12-02 12:32:17');
-- --------------------------------------------------------
--
-- Table structure for table `exam`
--
CREATE TABLE `exam` (
`id` bigint(20) UNSIGNED NOT NULL,
`exam_category_id` bigint(20) UNSIGNED NOT NULL,
`country_id` bigint(20) UNSIGNED NOT NULL,
`state_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `exam`
--
INSERT INTO `exam` (`id`, `exam_category_id`, `country_id`, `state_id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 2, 3, 'NPLAN', 'This is NAPLAN', '2022-11-29 13:16:56', '2022-12-01 10:26:16', NULL),
(2, 2, 1, 2, 'NPLAN 2', 'This is Test Demo', '2022-11-30 11:40:17', '2022-11-30 11:40:17', NULL),
(3, 2, 2, 3, 'NPLAN 3', 'This is NAPLAN', '2022-11-30 11:44:58', '2022-11-30 12:42:31', NULL),
(4, 1, 3, 4, 'NPLAN 4', 'This is NPLAN 4', '2022-12-01 10:27:49', '2022-12-02 13:11:16', NULL),
(5, 3, 3, 4, 'NPLAN Exam', 'Testwet', '2022-12-03 04:45:36', '2022-12-03 04:45:36', NULL),
(6, 1, 2, 3, 'America', 'test', '2022-12-04 01:12:59', '2022-12-04 01:13:13', '2022-12-04 01:13:13');
-- --------------------------------------------------------
--
-- Table structure for table `exam_category`
--
CREATE TABLE `exam_category` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `exam_category`
--
INSERT INTO `exam_category` (`id`, `title`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Category', '2022-11-28 13:00:13', '2022-11-28 13:17:08', NULL),
(2, 'Category 2', '2022-11-28 13:01:59', '2022-11-30 12:56:27', NULL),
(3, 'Category 3', '2022-12-02 12:37:00', '2022-12-02 12:37:36', NULL),
(4, 'Category 4', '2022-12-03 04:44:23', '2022-12-05 11:56:51', '2022-12-05 11:56:51');
-- --------------------------------------------------------
--
-- Table structure for table `failed_jobs`
--
CREATE TABLE `failed_jobs` (
`id` bigint(20) UNSIGNED NOT NULL,
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) 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, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2022_11_26_083707_add_colunm_to_users_table', 2),
(6, '2022_11_26_190814_change_colounm_size_password_resets_table', 3),
(7, '2022_11_26_194150_add_colunm_to_password_resets_table', 4),
(8, '2022_11_27_082949_create_plans_table', 5),
(9, '2022_11_27_085822_create_country_table', 5),
(10, '2022_11_27_085937_creat_city_table', 6),
(11, '2022_11_27_120108_create_state_table', 7),
(12, '2022_11_27_174609_add_colunm_to_country', 8),
(13, '2022_11_28_164122_add_colunm_to_state_table', 9),
(14, '2022_11_28_175105_create_exam_category_table', 10),
(15, '2022_11_29_160620_create_exam_table', 11),
(16, '2022_11_29_181715_add_colunm_to_exam_table', 12),
(17, '2022_12_01_171004_add_colunm_to_plans_table', 13),
(18, '2022_12_01_174704_create_plans_table', 14),
(19, '2022_12_01_180824_add_colunm_to_plans_table', 15),
(20, '2022_12_02_184735_create_subjects_table', 16),
(21, '2022_12_03_062303_create_test_table', 17),
(22, '2022_12_03_081541_add_colunm_to_subject_table', 18),
(23, '2022_12_03_134412_add_colunm_to_plans_table', 19),
(24, '2022_12_04_071758_create_test_question_table', 20),
(26, '2022_12_11_114751_add_colunm_to_test_question', 21);
-- --------------------------------------------------------
--
-- Table structure for table `password_resets`
--
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` text 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;
-- --------------------------------------------------------
--
-- Table structure for table `personal_access_tokens`
--
CREATE TABLE `personal_access_tokens` (
`id` bigint(20) UNSIGNED NOT NULL,
`tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`tokenable_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_used_at` timestamp NULL DEFAULT NULL,
`expires_at` timestamp NULL 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 `plans`
--
CREATE TABLE `plans` (
`id` bigint(20) UNSIGNED NOT NULL,
`exam_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`year` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`price` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`validity` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`unlimited_test_attempt` tinyint(4) NOT NULL COMMENT '1-yes,0-no',
`attempt` int(11) DEFAULT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `plans`
--
INSERT INTO `plans` (`id`, `exam_id`, `name`, `year`, `price`, `validity`, `unlimited_test_attempt`, `attempt`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, '3 Year', '3', '2000', '356', 0, 5, 'aeqwe', '2022-12-01 13:24:46', '2022-12-03 12:04:51', NULL),
(2, 2, '6 year', '6', '5000', '450', 0, 2, 'Test', '2022-12-01 13:55:51', '2022-12-02 13:14:57', NULL),
(3, 4, '4', '4', '500', '365', 1, NULL, 'This is NPLAN 4 Plan', '2022-12-03 11:27:00', '2022-12-03 12:05:59', NULL),
(4, 1, 'English', '3', '200', '356', 1, NULL, 'test', '2022-12-04 01:14:17', '2022-12-04 01:14:17', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `state`
--
CREATE TABLE `state` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`country_id` bigint(20) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `state`
--
INSERT INTO `state` (`id`, `name`, `country_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'sydney', 1, '2022-11-28 11:53:11', '2022-11-28 12:13:33', NULL),
(2, 'Perth', 1, '2022-11-28 11:53:48', '2022-11-28 12:14:47', NULL),
(3, 'Gujrat', 2, '2022-11-28 11:54:05', '2022-11-28 12:12:51', NULL),
(4, 'California', 3, '2022-12-01 10:27:09', '2022-12-01 10:27:09', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `subjects`
--
CREATE TABLE `subjects` (
`id` bigint(20) UNSIGNED NOT NULL,
`plan_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `subjects`
--
INSERT INTO `subjects` (`id`, `plan_id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'English', 'This is English Subject', '2022-12-02 14:02:36', '2022-12-03 02:55:47', NULL),
(2, 1, 'Medium English', 'This is Medium English', '2022-12-03 00:47:58', '2022-12-03 03:20:15', NULL),
(3, 1, 'Mathematics', 'This is Mathematics', '2022-12-03 00:48:29', '2022-12-03 03:18:47', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `test`
--
CREATE TABLE `test` (
`id` bigint(20) UNSIGNED NOT NULL,
`subject_id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `test`
--
INSERT INTO `test` (`id`, `subject_id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'English Test', 'This is English Test', '2022-12-03 06:36:42', '2022-12-03 08:02:40', NULL),
(2, 2, 'Medium English Test', 'This is Medium English Test', '2022-12-03 06:59:12', '2022-12-03 06:59:12', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `test_question`
--
CREATE TABLE `test_question` (
`id` bigint(20) UNSIGNED NOT NULL,
`test_id` bigint(20) UNSIGNED NOT NULL,
`question_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`question` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`question_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`option_1` text COLLATE utf8mb4_unicode_ci NOT NULL,
`option_2` text COLLATE utf8mb4_unicode_ci NOT NULL,
`option_3` text COLLATE utf8mb4_unicode_ci NOT NULL,
`option_4` text COLLATE utf8mb4_unicode_ci NOT NULL,
`true_answer` text COLLATE utf8mb4_unicode_ci NOT NULL,
`solution` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`role` tinyint(4) NOT NULL COMMENT '1-admin,2-student',
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci 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 `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'auschooladmin@yopmail.com', NULL, '$2y$10$V6qT1fPyObzGhZt6Ikx5jODtwUDftYIIYb/go.kCOOskDe5pkRDNW', 1, NULL, '2022-12-09 13:22:09', '2022-12-09 13:22:09'),
(2, 'Student1', 'student1@yopmail.com', NULL, '$2y$10$6WdD7dhhkyNkxeNRIGzxUeKt/vy2GHGQb2fS/5tUC6RpBoPMl1RWG', 2, NULL, '2022-12-09 13:24:26', '2022-12-10 06:34:49'),
(3, 'Student3', 'student3@yopmail.com', NULL, '$2y$10$3kgWdumLNbb0f/TwlBjVwuVuR4tT73KIp8Oa3v3/2dn5r.XGlMrKy', 2, NULL, '2022-12-09 13:34:49', '2022-12-09 13:34:49'),
(4, 'Student4', 'student4@yopmail.com', NULL, '$2y$10$Wl1W5R7Rger/RbHlHzX83eJTlweQe62pV4dN/Z8blq7jstaEJV8rO', 2, NULL, '2022-12-09 13:56:19', '2022-12-09 13:56:19'),
(5, 'Student5', 'student5@yopmail.com', NULL, '$2y$10$vVQODFOJtTmK0dPK6Ru9h.1SQLjRB4bqrZbHZaptIAMu7phc3HLxu', 2, NULL, '2022-12-09 13:57:58', '2022-12-09 13:57:58'),
(6, 'Student 2', 'student2@yopmail.com', NULL, '$2y$10$jJRxB.izbJoPhZK9n7GBDeLOpAXCG.6RvMADUKtM4iDowUgDKZzMC', 2, NULL, '2022-12-10 01:14:17', '2022-12-10 01:14:17');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `city`
--
ALTER TABLE `city`
ADD PRIMARY KEY (`id`),
ADD KEY `city_country_id_foreign` (`country_id`);
--
-- Indexes for table `country`
--
ALTER TABLE `country`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `exam`
--
ALTER TABLE `exam`
ADD PRIMARY KEY (`id`),
ADD KEY `exam_exam_category_id_foreign` (`exam_category_id`),
ADD KEY `exam_country_id_foreign` (`country_id`),
ADD KEY `exam_state_id_foreign` (`state_id`);
--
-- Indexes for table `exam_category`
--
ALTER TABLE `exam_category`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
--
-- 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 `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
--
-- Indexes for table `plans`
--
ALTER TABLE `plans`
ADD PRIMARY KEY (`id`),
ADD KEY `plans_exam_id_foreign` (`exam_id`);
--
-- Indexes for table `state`
--
ALTER TABLE `state`
ADD PRIMARY KEY (`id`),
ADD KEY `state_country_id_foreign` (`country_id`);
--
-- Indexes for table `subjects`
--
ALTER TABLE `subjects`
ADD PRIMARY KEY (`id`),
ADD KEY `subjects_plan_id_foreign` (`plan_id`);
--
-- Indexes for table `test`
--
ALTER TABLE `test`
ADD PRIMARY KEY (`id`),
ADD KEY `test_subject_id_foreign` (`subject_id`);
--
-- Indexes for table `test_question`
--
ALTER TABLE `test_question`
ADD PRIMARY KEY (`id`),
ADD KEY `test_question_test_id_foreign` (`test_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 `city`
--
ALTER TABLE `city`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `country`
--
ALTER TABLE `country`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `exam`
--
ALTER TABLE `exam`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `exam_category`
--
ALTER TABLE `exam_category`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `plans`
--
ALTER TABLE `plans`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `state`
--
ALTER TABLE `state`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `subjects`
--
ALTER TABLE `subjects`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `test`
--
ALTER TABLE `test`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `test_question`
--
ALTER TABLE `test_question`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `city`
--
ALTER TABLE `city`
ADD CONSTRAINT `city_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`);
--
-- Constraints for table `exam`
--
ALTER TABLE `exam`
ADD CONSTRAINT `exam_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`),
ADD CONSTRAINT `exam_exam_category_id_foreign` FOREIGN KEY (`exam_category_id`) REFERENCES `exam_category` (`id`),
ADD CONSTRAINT `exam_state_id_foreign` FOREIGN KEY (`state_id`) REFERENCES `state` (`id`);
--
-- Constraints for table `plans`
--
ALTER TABLE `plans`
ADD CONSTRAINT `plans_exam_id_foreign` FOREIGN KEY (`exam_id`) REFERENCES `exam` (`id`);
--
-- Constraints for table `state`
--
ALTER TABLE `state`
ADD CONSTRAINT `state_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`);
--
-- Constraints for table `subjects`
--
ALTER TABLE `subjects`
ADD CONSTRAINT `subjects_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`);
--
-- Constraints for table `test`
--
ALTER TABLE `test`
ADD CONSTRAINT `test_subject_id_foreign` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`);
--
-- Constraints for table `test_question`
--
ALTER TABLE `test_question`
ADD CONSTRAINT `test_question_test_id_foreign` FOREIGN KEY (`test_id`) REFERENCES `test` (`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 */;