CREATE DATABASE IF NOT EXISTS `learning` DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8mb4_unicode_ci;
USE `learning`;


CREATE TABLE IF NOT EXISTS `migrations` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `migration` VARCHAR(255) not null, `batch` INT not null) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO migrations VALUES(1,'0001_01_01_000000_create_users_table',1);
INSERT INTO migrations VALUES(2,'0001_01_01_000001_create_cache_table',1);
INSERT INTO migrations VALUES(3,'0001_01_01_000002_create_jobs_table',1);
INSERT INTO migrations VALUES(4,'2025_10_11_144332_add_last_activity_to_users_table',2);
INSERT INTO migrations VALUES(5,'2025_10_12_100939_create_permission_tables',2);
INSERT INTO migrations VALUES(6,'2025_10_12_230016_create_personal_access_tokens_table',2);
INSERT INTO migrations VALUES(7,'2025_10_13_000001_create_questions_table',2);
INSERT INTO migrations VALUES(8,'2025_10_13_000001_create_schools_table',2);
INSERT INTO migrations VALUES(9,'2025_10_13_000001_create_subjects_table',2);
INSERT INTO migrations VALUES(10,'2025_10_13_000002_add_subject_id_to_questions_table',2);
INSERT INTO migrations VALUES(11,'2025_10_13_000002_create_grades_table',2);
INSERT INTO migrations VALUES(12,'2025_10_13_000003_create_classes_table',2);
INSERT INTO migrations VALUES(13,'2025_10_13_000004_create_exam_participants_table',2);
INSERT INTO migrations VALUES(14,'2025_10_13_000005_add_name_to_classes_table',2);
INSERT INTO migrations VALUES(15,'2025_10_13_100000_add_password_to_exam_participants_table',2);
INSERT INTO migrations VALUES(16,'2025_10_13_110000_add_last_activity_to_exam_participants_table',2);
INSERT INTO migrations VALUES(17,'2025_10_13_120500_add_school_and_grade_to_subjects_table',3);
INSERT INTO migrations VALUES(18,'2025_10_13_121000_make_school_and_grade_required_in_subjects_table',4);
INSERT INTO migrations VALUES(19,'2025_10_13_122000_create_exams_table',4);
INSERT INTO migrations VALUES(20,'2025_10_13_123000_add_code_duration_schedule_to_exams_table',4);
INSERT INTO migrations VALUES(21,'2025_10_13_130000_create_exam_sessions_table',4);
INSERT INTO migrations VALUES(22,'2025_10_14_000003_create_exam_results_table',4);
INSERT INTO migrations VALUES(23,'2025_10_14_010500_fix_guard_names_in_roles_permissions',4);
INSERT INTO migrations VALUES(24,'2025_10_14_233600_add_profile_fields_to_users_table',5);
INSERT INTO migrations VALUES(25,'2025_10_14_120000_add_login_token_and_device_to_exam_participants_table',6);
INSERT INTO migrations VALUES(26,'2025_10_14_121000_add_draft_answers_to_exam_sessions_table',6);
INSERT INTO migrations VALUES(27,'2025_10_15_000001_add_password_and_last_activity_to_exam_participants_table',6);
INSERT INTO migrations VALUES(28,'2025_10_14_000001_add_media_columns_to_schools_table',7);
INSERT INTO migrations VALUES(29,'2025_10_15_010100_add_kepsek_to_schools_table',8);
INSERT INTO migrations VALUES(30,'2025_10_15_020500_add_fields_to_schools_table',9);
INSERT INTO migrations VALUES(31,'2025_10_15_030000_add_created_by_to_subjects_table',10);
CREATE TABLE IF NOT EXISTS `sessions` (`id` VARCHAR(255) not null, `user_id` INT, `ip_address` VARCHAR(255), `user_agent` TEXT, `payload` TEXT not null, `last_activity` INT not null, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO sessions VALUES('u5gIAoMpOFziIX48sa2ftn181iHKwwBDfVhjCiie',NULL,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoiYXdiVm5TZEhaMFUybXJBTzBZVUFXWXp3V3IzM1dhUGhHTFFvWm9SNCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1760114698);
CREATE TABLE IF NOT EXISTS `cache` (`key` VARCHAR(255) not null, `value` TEXT not null, `expiration` INT not null, PRIMARY KEY (`key`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO cache VALUES('fr-sqdf-cache-5dc3556dd6ff2daaaceb0f266f657915:timer','i:1760583815;',1760583815);
INSERT INTO cache VALUES('fr-sqdf-cache-5dc3556dd6ff2daaaceb0f266f657915','i:2;',1760583815);

INSERT INTO cache VALUES('fr-sqdf-cache-707db6c5613b94753f68fa8c20449536:timer','i:1760611932;',1760611932);
INSERT INTO cache VALUES('fr-sqdf-cache-707db6c5613b94753f68fa8c20449536','i:1;',1760611932);
INSERT INTO cache VALUES('fr-sqdf-cache-006af56a6e96c4829ba04a6e6ebfc451:timer','i:1760624852;',1760624852);
INSERT INTO cache VALUES('fr-sqdf-cache-006af56a6e96c4829ba04a6e6ebfc451','i:1;',1760624852);
INSERT INTO cache VALUES('fr-sqdf-cache-fab7596a2ff819f281afa96b4c083b3c:timer','i:1760624873;',1760624873);
INSERT INTO cache VALUES('fr-sqdf-cache-fab7596a2ff819f281afa96b4c083b3c','i:1;',1760624873);
INSERT INTO cache VALUES('fr-sqdf-cache-3a9cf4f33db47326c5873f0aef27fc23:timer','i:1760624879;',1760624879);
INSERT INTO cache VALUES('fr-sqdf-cache-3a9cf4f33db47326c5873f0aef27fc23','i:1;',1760624879);
CREATE TABLE IF NOT EXISTS `jobs` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `queue` VARCHAR(255) not null, `payload` TEXT not null, `attempts` INT not null, `reserved_at` INT, `available_at` INT not null, `created_at` INT not null) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO jobs VALUES(1,'autosave','{"uuid":"52f50c6b-b39a-4b59-9839-8fa12d80c79e","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:1;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:14;s:1:\"B\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760519527,"delay":null}',0,NULL,1760519527,1760519527);
INSERT INTO jobs VALUES(2,'autosave','{"uuid":"3de76da1-c83b-44bb-91d0-d84bd658d7f0","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:1;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:14;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760519531,"delay":null}',0,NULL,1760519531,1760519531);
INSERT INTO jobs VALUES(3,'autosave','{"uuid":"61de347b-cf35-4410-a918-5e0fab64dad6","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:2;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:10;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760520603,"delay":null}',0,NULL,1760520603,1760520603);
INSERT INTO jobs VALUES(4,'autosave','{"uuid":"51dac059-0ad1-48da-93bf-ad50b88d6536","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:2;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:9;s:1:\"D\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760520613,"delay":null}',0,NULL,1760520613,1760520613);
INSERT INTO jobs VALUES(5,'autosave','{"uuid":"ddaf1e98-4df5-48d7-99ec-700c7f87d05a","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:3;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:7;s:1:\"D\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760520786,"delay":null}',0,NULL,1760520786,1760520786);
INSERT INTO jobs VALUES(6,'autosave','{"uuid":"8bb5536b-33c6-48ad-8575-1b8957dcd284","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:3;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:7;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760522358,"delay":null}',0,NULL,1760522358,1760522358);
INSERT INTO jobs VALUES(7,'autosave','{"uuid":"a1ca175f-c163-4936-b6dd-9499760c1706","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:3;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:7;s:1:\"B\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760522363,"delay":null}',0,NULL,1760522363,1760522363);
INSERT INTO jobs VALUES(8,'autosave','{"uuid":"aaf35851-8875-4708-b286-de50173ec50f","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:1;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:7;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760522648,"delay":null}',0,NULL,1760522648,1760522648);
INSERT INTO jobs VALUES(9,'autosave','{"uuid":"3bc895c8-204a-47d8-b5d2-528d95e67dc0","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:1;s:13:\"participantId\";i:7;s:7:\"answers\";a:1:{i:7;s:1:\"B\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760522650,"delay":null}',0,NULL,1760522650,1760522650);
INSERT INTO jobs VALUES(10,'autosave','{"uuid":"87797d81-a1f1-466b-b57a-6f7c75a37ca6","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:1;s:13:\"participantId\";i:7;s:7:\"answers\";a:9:{i:1;s:1:\"B\";i:2;s:1:\"E\";i:4;s:1:\"A\";i:5;s:1:\"A\";i:6;s:1:\"A\";i:11;s:1:\"A\";i:12;s:1:\"A\";i:13;s:1:\"4\";i:14;s:10:\"Abi Hendri\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760522711,"delay":null}',0,NULL,1760522711,1760522711);
INSERT INTO jobs VALUES(11,'autosave','{"uuid":"3ebae637-c003-4161-996c-7ebc6960c0a9","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:4;s:13:\"participantId\";i:3;s:7:\"answers\";a:1:{i:5;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760525238,"delay":null}',0,NULL,1760525238,1760525238);
INSERT INTO jobs VALUES(12,'autosave','{"uuid":"530c8105-09bd-40fd-80c6-5c6b0c99449d","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:4;s:13:\"participantId\";i:3;s:7:\"answers\";a:1:{i:1;s:1:\"B\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760525242,"delay":null}',0,NULL,1760525242,1760525242);
INSERT INTO jobs VALUES(13,'autosave','{"uuid":"98991319-401e-4f83-b838-cd44cc5b7984","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:4;s:13:\"participantId\";i:3;s:7:\"answers\";a:1:{i:5;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760525516,"delay":null}',0,NULL,1760525516,1760525516);
INSERT INTO jobs VALUES(14,'autosave','{"uuid":"a38a0374-96e5-4951-8274-095872601044","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:4;s:13:\"participantId\";i:3;s:7:\"answers\";a:1:{i:1;s:1:\"C\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760525522,"delay":null}',0,NULL,1760525522,1760525522);
INSERT INTO jobs VALUES(15,'autosave','{"uuid":"d08e5795-d825-4106-ad43-39bfba200baf","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:4;s:13:\"participantId\";i:3;s:7:\"answers\";a:1:{i:5;s:1:\"A\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760526283,"delay":null}',0,NULL,1760526283,1760526283);
INSERT INTO jobs VALUES(16,'autosave','{"uuid":"f4dc149e-d93a-4e54-9714-89e8d5784ffd","displayName":"App\\Jobs\\SaveExamDraftAnswers","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"failOnTimeout":false,"backoff":null,"timeout":null,"retryUntil":null,"data":{"commandName":"App\\Jobs\\SaveExamDraftAnswers","command":"O:29:\"App\\Jobs\\SaveExamDraftAnswers\":5:{s:9:\"sessionId\";i:4;s:13:\"participantId\";i:3;s:7:\"answers\";a:1:{i:1;s:1:\"B\";}s:4:\"meta\";a:2:{s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:117:\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/141.0.0.0 Safari\/537.36\";}s:5:\"queue\";s:8:\"autosave\";}"},"createdAt":1760526286,"delay":null}',0,NULL,1760526286,1760526286);
CREATE TABLE IF NOT EXISTS `job_batches` (`id` VARCHAR(255) not null, `name` VARCHAR(255) not null, `total_jobs` INT not null, `pending_jobs` INT not null, `failed_jobs` INT not null, `failed_job_ids` TEXT not null, `options` TEXT, `cancelled_at` INT, `created_at` INT not null, `finished_at` INT, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `failed_jobs` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `uuid` VARCHAR(255) not null, `connection` TEXT not null, `queue` TEXT not null, `payload` TEXT not null, `exception` TEXT not null, `failed_at` DATETIME not null default CURRENT_TIMESTAMP) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `permissions` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(255) not null, `guard_name` VARCHAR(255) not null, `created_at` DATETIME, `updated_at` DATETIME) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO permissions VALUES(1,'view-dashboard','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(2,'manage-users','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(3,'create-user','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(4,'edit-user','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(5,'delete-user','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(6,'view-user','web','2025-10-14 23:32:56','2025-10-14 23:32:56');

INSERT INTO permissions VALUES(8,'manage-roles','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(9,'assign-permissions','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(10,'create-exam','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(11,'edit-exam','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(12,'delete-exam','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(13,'view-exam','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(14,'manage-exams','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(15,'create-question','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(16,'edit-question','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(17,'delete-question','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(18,'view-question','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(19,'manage-questions','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(20,'input-score','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(21,'edit-score','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(22,'view-score','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(23,'manage-scores','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(24,'export-scores','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(25,'take-exam','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(26,'view-result','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO permissions VALUES(27,'view-subject','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
INSERT INTO permissions VALUES(28,'create-subject','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
INSERT INTO permissions VALUES(29,'edit-subject','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
INSERT INTO permissions VALUES(30,'delete-subject','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
INSERT INTO permissions VALUES(31,'manage-subjects','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
INSERT INTO permissions VALUES(32,'view-all-subjects','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
INSERT INTO permissions VALUES(33,'view-own-subjects','web','2025-10-15 14:04:22','2025-10-15 14:04:22');
CREATE TABLE IF NOT EXISTS `roles` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(255) not null, `guard_name` VARCHAR(255) not null, `created_at` DATETIME, `updated_at` DATETIME) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO roles VALUES(1,'superadmin','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO roles VALUES(2,'pegawai','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO roles VALUES(3,'guru','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
INSERT INTO roles VALUES(4,'murid','web','2025-10-14 23:32:56','2025-10-14 23:32:56');
CREATE TABLE IF NOT EXISTS `model_has_permissions` (`permission_id` INT not null, `model_type` VARCHAR(255) not null, `model_id` INT not null, foreign key(`permission_id`) references `permissions`(`id`) on delete cascade, PRIMARY KEY (`permission_id`, `model_id`, `model_type`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `model_has_roles` (`role_id` INT not null, `model_type` VARCHAR(255) not null, `model_id` INT not null, foreign key(`role_id`) references `roles`(`id`) on delete cascade, PRIMARY KEY (`role_id`, `model_id`, `model_type`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO model_has_roles VALUES(3,'App\Models\User',5);
INSERT INTO model_has_roles VALUES(1,'App\Models\User',1);
INSERT INTO model_has_roles VALUES(2,'App\Models\User',2);
INSERT INTO model_has_roles VALUES(3,'App\Models\User',3);
INSERT INTO model_has_roles VALUES(4,'App\Models\User',4);
CREATE TABLE IF NOT EXISTS `role_has_permissions` (`permission_id` INT not null, `role_id` INT not null, foreign key(`permission_id`) references `permissions`(`id`) on delete cascade, foreign key(`role_id`) references `roles`(`id`) on delete cascade, PRIMARY KEY (`permission_id`, `role_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO role_has_permissions VALUES(1,1);
INSERT INTO role_has_permissions VALUES(2,1);
INSERT INTO role_has_permissions VALUES(3,1);
INSERT INTO role_has_permissions VALUES(4,1);
INSERT INTO role_has_permissions VALUES(5,1);
INSERT INTO role_has_permissions VALUES(6,1);
INSERT INTO role_has_permissions VALUES(7,1);
INSERT INTO role_has_permissions VALUES(8,1);
INSERT INTO role_has_permissions VALUES(9,1);
INSERT INTO role_has_permissions VALUES(10,1);
INSERT INTO role_has_permissions VALUES(11,1);
INSERT INTO role_has_permissions VALUES(12,1);
INSERT INTO role_has_permissions VALUES(13,1);
INSERT INTO role_has_permissions VALUES(14,1);
INSERT INTO role_has_permissions VALUES(15,1);
INSERT INTO role_has_permissions VALUES(16,1);
INSERT INTO role_has_permissions VALUES(17,1);
INSERT INTO role_has_permissions VALUES(18,1);
INSERT INTO role_has_permissions VALUES(19,1);
INSERT INTO role_has_permissions VALUES(20,1);
INSERT INTO role_has_permissions VALUES(21,1);
INSERT INTO role_has_permissions VALUES(22,1);
INSERT INTO role_has_permissions VALUES(23,1);
INSERT INTO role_has_permissions VALUES(24,1);
INSERT INTO role_has_permissions VALUES(25,1);
INSERT INTO role_has_permissions VALUES(26,1);
INSERT INTO role_has_permissions VALUES(27,1);
INSERT INTO role_has_permissions VALUES(28,1);
INSERT INTO role_has_permissions VALUES(29,1);
INSERT INTO role_has_permissions VALUES(30,1);
INSERT INTO role_has_permissions VALUES(31,1);
INSERT INTO role_has_permissions VALUES(32,1);
INSERT INTO role_has_permissions VALUES(33,1);
INSERT INTO role_has_permissions VALUES(1,2);
INSERT INTO role_has_permissions VALUES(2,2);
INSERT INTO role_has_permissions VALUES(3,2);
INSERT INTO role_has_permissions VALUES(4,2);
INSERT INTO role_has_permissions VALUES(6,2);
INSERT INTO role_has_permissions VALUES(7,2);
INSERT INTO role_has_permissions VALUES(13,2);
INSERT INTO role_has_permissions VALUES(22,2);
INSERT INTO role_has_permissions VALUES(24,2);
INSERT INTO role_has_permissions VALUES(27,2);
INSERT INTO role_has_permissions VALUES(32,2);
INSERT INTO role_has_permissions VALUES(1,3);
INSERT INTO role_has_permissions VALUES(6,3);
INSERT INTO role_has_permissions VALUES(10,3);
INSERT INTO role_has_permissions VALUES(11,3);
INSERT INTO role_has_permissions VALUES(12,3);
INSERT INTO role_has_permissions VALUES(13,3);
INSERT INTO role_has_permissions VALUES(14,3);
INSERT INTO role_has_permissions VALUES(15,3);
INSERT INTO role_has_permissions VALUES(16,3);
INSERT INTO role_has_permissions VALUES(17,3);
INSERT INTO role_has_permissions VALUES(18,3);
INSERT INTO role_has_permissions VALUES(19,3);
INSERT INTO role_has_permissions VALUES(20,3);
INSERT INTO role_has_permissions VALUES(21,3);
INSERT INTO role_has_permissions VALUES(22,3);
INSERT INTO role_has_permissions VALUES(23,3);
INSERT INTO role_has_permissions VALUES(24,3);
INSERT INTO role_has_permissions VALUES(27,3);
INSERT INTO role_has_permissions VALUES(33,3);
INSERT INTO role_has_permissions VALUES(28,3);
INSERT INTO role_has_permissions VALUES(29,3);
INSERT INTO role_has_permissions VALUES(30,3);
INSERT INTO role_has_permissions VALUES(1,4);
INSERT INTO role_has_permissions VALUES(25,4);
INSERT INTO role_has_permissions VALUES(26,4);
CREATE TABLE IF NOT EXISTS `role_user` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `user_id` INT not null, `role_id` INT not null, `created_at` DATETIME, `updated_at` DATETIME, foreign key(`user_id`) references `users`(`id`) on delete cascade, foreign key(`role_id`) references `roles`(`id`) on delete cascade) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `schools` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `nama` VARCHAR(255) not null, `alamat` VARCHAR(255), `created_at` DATETIME, `updated_at` DATETIME, `logo_path` VARCHAR(255), `signature_path` VARCHAR(255), `stamp_path` VARCHAR(255), `kepsek` VARCHAR(255), `kode` VARCHAR(255), `kota` VARCHAR(255), `provinsi` VARCHAR(255), `no` VARCHAR(255), `status` VARCHAR(255) not null default 'Aktif', `note` TEXT) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO schools VALUES(1,'SMP Q BANDAR LAMPUNG','BANDAR LAMPUNG','2025-10-15 00:32:29','2025-10-15 00:33:36',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Aktif',NULL);
INSERT INTO schools VALUES(2,'SMP Q LAMPUNG SELATAN','LAMPUNG SELATAN','2025-10-15 00:32:38','2025-10-15 00:34:02',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Aktif',NULL);
INSERT INTO schools VALUES(3,'SMA QURAN DARUL FATTAH','Jl. Kopi No.23 A, Gedong Meneng, Kec. Rajabasa, Kota Bandar Lampung, Lampung 35141','2025-10-15 00:33:01','2025-10-15 12:42:07','schools/3/logo.png','schools/3/signature.png',NULL,'Fatkhurrahman, Lc,.M.Pd',NULL,NULL,NULL,NULL,'Aktif',NULL);
INSERT INTO schools VALUES(4,'Sekolah Uji 1760469713','Jalan Token','2025-10-15 02:21:53','2025-10-15 02:21:53',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Aktif',NULL);
CREATE TABLE IF NOT EXISTS `questions` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `TEXT` TEXT not null, `option_a` TEXT not null, `option_b` TEXT not null, `option_c` TEXT not null, `option_d` TEXT not null, `option_e` TEXT not null, `key_answer` VARCHAR(255) not null, `image_path` VARCHAR(255), `created_by` INT, `created_at` DATETIME, `updated_at` DATETIME, `subject_id` INT, foreign key(`subject_id`) references `subjects`(`id`) on delete set null) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO questions VALUES(1,'1+1','1','2','3','4','5','B',NULL,1,'2025-10-15 00:53:26','2025-10-15 00:53:26',2);
INSERT INTO questions VALUES(2,'5 X 5 =','20','21','22','24','25','E',NULL,1,'2025-10-15 00:53:55','2025-10-15 00:53:55',2);
INSERT INTO questions VALUES(4,replace(replace('![img](http://127.0.0.1:8001/storage/questions/8955bc8b-c70a-454c-bf83-efd784cf33b2.png) \r\nLogo diatas adalah ?','\r',char(13)),'\n',char(10)),'SQ','SD','SMP','SMA','SS','A',NULL,1,'2025-10-15 01:01:19','2025-10-15 01:01:19',2);
INSERT INTO questions VALUES(5,replace(replace('![img](http://127.0.0.1:8001/storage/questions/a21bed27-8ffe-42d2-ab5a-20bb36d0efe4.jpg) \r\nGambar diatas adalah ?','\r',char(13)),'\n',char(10)),'![img](http://127.0.0.1:8001/storage/questions/c7f6968c-bcd0-4b21-bc66-b1b31921d5bd.jpg)','![img](http://127.0.0.1:8001/storage/questions/32ad4f7c-b4b2-4ca2-a8d4-1085fe3d6531.jpeg)','![img](http://127.0.0.1:8001/storage/questions/733c762e-56b4-492f-a6b0-8ac5a18e6f52.png)','![img](http://127.0.0.1:8001/storage/questions/82decbc3-ef85-4542-afb2-0cfa81a1e2f6.png)','![img](http://127.0.0.1:8001/storage/questions/a61abb2c-afd7-468f-aa2a-0925146ae4a7.png)','A',NULL,1,'2025-10-15 01:28:55','2025-10-15 01:28:55',2);
INSERT INTO questions VALUES(6,'![img](http://127.0.0.1:8001/storage/questions/2250ddf7-5644-4234-a64a-f8e5e5c6dea9.jpg)','![img](http://127.0.0.1:8001/storage/questions/ae75f05a-7c55-4bf2-8733-2ccd5e5eb778.jpg)','sdwa','![img](http://127.0.0.1:8001/storage/questions/dc3fe360-bc18-45a3-b1d2-cd758a043029.png)','![img](http://127.0.0.1:8001/storage/questions/044c1a34-e49b-4552-8193-a398d51dfe8f.png)','','B',NULL,1,'2025-10-15 01:32:12','2025-10-15 01:32:12',2);
INSERT INTO questions VALUES(7,replace(replace('gambar dibawah  adalah ?\r\n ![img](http://127.0.0.1:8001/storage/questions/mtk-kelas-10/473f6e23-7161-402b-beff-472fd153801f.jpg)','\r',char(13)),'\n',char(10)),'laptop','server','sdw','ffff','vvvv','B',NULL,1,'2025-10-15 01:41:12','2025-10-15 01:41:12',2);
INSERT INTO questions VALUES(8,'pancasila ada','1','2','3','4','5','E',NULL,1,'2025-10-15 01:42:28','2025-10-15 01:42:28',1);
INSERT INTO questions VALUES(9,replace(replace('\begin{bmatrix}1 & 2 \\ 3 & d\end{bmatrix}\r\nhasilnya adalah ?','\r',char(13)),'\n',char(10)),'\begin{bmatrix}ad & s \\\end{bmatrix}','\sqrt{ 22}','\frac{1 }{ 1}','1\left(2  \right) x\theta -8°C','\sqrt{1}_1^1','E',NULL,1,'2025-10-15 01:47:04','2025-10-15 01:47:04',1);
INSERT INTO questions VALUES(10,'!بشأن أمي وتورطها في المشروع الع','بشأن أم المش','ترجمة الأفلام','روع العام','رطها ف','ي وتوي','C',NULL,1,'2025-10-15 01:52:43','2025-10-15 01:52:43',1);
INSERT INTO questions VALUES(11,'soal gamabar  ![img](http://127.0.0.1:8000/storage/questions/mtk-kelas-10/521eaafa-52d8-42be-8af7-4a7a0524ccc0.png)','1','2','3','4','5','C',NULL,1,'2025-10-15 15:36:51','2025-10-15 15:36:51',2);
INSERT INTO questions VALUES(12,'soal swal alert testing','[b]asdawda[/b]','adawda','sdwadaw','dwadaw','adwada','B',NULL,1,'2025-10-15 15:43:12','2025-10-15 15:43:12',2);
INSERT INTO questions VALUES(13,'pancailsa aline ke','4','','','','','A',NULL,1,'2025-10-15 15:51:09','2025-10-15 15:51:09',2);
INSERT INTO questions VALUES(14,'siapa nama guru ppkn ? secara lengkap !','Hendri Syaiful Nugraha, S.H. Gr','','','','','A',NULL,1,'2025-10-15 15:57:37','2025-10-15 15:57:37',2);
INSERT INTO questions VALUES(16,'apa','1','','','','','A',NULL,1,'2025-10-15 18:31:06','2025-10-15 18:31:06',4);
CREATE TABLE IF NOT EXISTS `grades` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `id_school` INT not null, `grade` INT not null, `created_at` DATETIME, `updated_at` DATETIME, foreign key(`id_school`) references `schools`(`id`) on delete cascade) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO grades VALUES(1,1,7,'2025-10-15 00:39:56','2025-10-15 00:39:56');
INSERT INTO grades VALUES(2,1,8,'2025-10-15 00:40:04','2025-10-15 00:40:04');
INSERT INTO grades VALUES(3,1,9,'2025-10-15 00:40:10','2025-10-15 00:40:10');
INSERT INTO grades VALUES(4,2,7,'2025-10-15 00:40:23','2025-10-15 00:40:23');
INSERT INTO grades VALUES(5,2,8,'2025-10-15 00:40:29','2025-10-15 00:40:29');
INSERT INTO grades VALUES(6,2,9,'2025-10-15 00:40:34','2025-10-15 00:40:34');
INSERT INTO grades VALUES(7,3,10,'2025-10-15 00:40:40','2025-10-15 00:40:40');
INSERT INTO grades VALUES(8,3,11,'2025-10-15 00:40:44','2025-10-15 00:40:44');
INSERT INTO grades VALUES(9,3,12,'2025-10-15 00:40:50','2025-10-15 00:40:50');
INSERT INTO grades VALUES(10,4,10,'2025-10-15 02:21:53','2025-10-15 02:21:53');
CREATE TABLE IF NOT EXISTS `classes` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `id_school` INT not null, `id_grade` INT not null, `created_at` DATETIME, `updated_at` DATETIME, `name` VARCHAR(255), foreign key(`id_school`) references `schools`(`id`) on delete cascade, foreign key(`id_grade`) references `grades`(`id`) on delete cascade) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO classes VALUES(1,3,7,'2025-10-15 00:50:15','2025-10-15 00:50:15','10A');
INSERT INTO classes VALUES(2,3,7,'2025-10-15 00:50:30','2025-10-15 00:50:30','10B');
INSERT INTO classes VALUES(3,3,7,'2025-10-15 00:50:39','2025-10-15 00:50:39','10C');
INSERT INTO classes VALUES(4,3,7,'2025-10-15 00:50:47','2025-10-15 00:50:47','10D');
INSERT INTO classes VALUES(5,3,7,'2025-10-15 00:50:56','2025-10-15 00:50:56','10E');
INSERT INTO classes VALUES(6,3,7,'2025-10-15 00:51:05','2025-10-15 00:51:05','10F');
INSERT INTO classes VALUES(7,4,10,'2025-10-15 02:21:53','2025-10-15 02:21:53','Kelas 10A');
CREATE TABLE IF NOT EXISTS `subjects` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(255) not null, `code` VARCHAR(255), `description` TEXT, `created_at` DATETIME, `updated_at` DATETIME, `id_school` INT, `id_grade` INT, `created_by` INT) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO subjects VALUES(1,'PPKN KELAS 10','PPKN',NULL,'2025-10-15 00:52:34','2025-10-15 00:52:34',3,7,NULL);
INSERT INTO subjects VALUES(2,'MTK KELAS 10','MATEMATIKA',NULL,'2025-10-15 00:52:59','2025-10-15 00:52:59',3,7,NULL);
INSERT INTO subjects VALUES(3,'tes mapel guru mtk','mtk','-','2025-10-15 14:09:08','2025-10-15 14:09:08',2,4,3);
INSERT INTO subjects VALUES(4,'TES MAPEL PKN','PKN 9','-','2025-10-15 14:10:47','2025-10-15 14:10:47',1,3,5);
CREATE TABLE IF NOT EXISTS `exams` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(255) not null, `description` TEXT, `id_subject` INT not null, `created_at` DATETIME, `updated_at` DATETIME, `code` VARCHAR(255) not null, `duration_minutes` INT not null, `scheduled_at` DATETIME not null, foreign key(`id_subject`) references `subjects`(`id`) on delete cascade) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO exams VALUES(1,'PPKN',NULL,1,'2025-10-15 01:53:19','2025-10-15 17:03:48','XFOEM3',15,'2025-10-15 17:01:00');
INSERT INTO exams VALUES(2,'MTK KELAS 10',NULL,2,'2025-10-15 01:53:52','2025-10-15 17:03:32','MEBUVK',15,'2025-10-15 17:00:00');
INSERT INTO exams VALUES(3,'ujian lewat','-',2,'2025-10-15 16:01:39','2025-10-15 17:03:24','YCHIJL',90,'2025-10-15 17:03:00');
CREATE TABLE IF NOT EXISTS `exam_sessions` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `exam_id` INT not null, `exam_participant_id` INT not null, `question_order` TEXT not null, `started_at` DATETIME, `finished_at` DATETIME, `created_at` DATETIME, `updated_at` DATETIME, `draft_answers` TEXT, foreign key(`exam_id`) references `exams`(`id`) on delete cascade, foreign key(`exam_participant_id`) references `exam_participants`(`id`) on delete cascade) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO exam_sessions VALUES(1,2,7,'[14,7,2,6,11,13,4,1,5,12]','2025-10-15 16:12:01','2025-10-15 17:05:13','2025-10-15 16:12:01','2025-10-15 17:05:13',NULL);
INSERT INTO exam_sessions VALUES(2,1,7,'[10,8,9]','2025-10-15 16:30:00',NULL,'2025-10-15 16:30:00','2025-10-15 16:30:00',NULL);
INSERT INTO exam_sessions VALUES(3,3,7,'[7,13,2,12,6,4,14,1,11,5]','2025-10-15 16:33:01',NULL,'2025-10-15 16:33:01','2025-10-15 16:33:01',NULL);
INSERT INTO exam_sessions VALUES(4,3,3,'[5,1,14,11,4,13,6,2,7,12]','2025-10-15 17:47:15','2025-10-15 18:05:47','2025-10-15 17:47:15','2025-10-15 18:05:47',NULL);
CREATE INDEX `sessions_user_id_index` on `sessions` (`user_id`);
CREATE INDEX `sessions_last_activity_index` on `sessions` (`last_activity`);
CREATE INDEX `jobs_queue_index` on `jobs` (`queue`);
CREATE UNIQUE INDEX `failed_jobs_uuid_unique` on `failed_jobs` (`uuid`);
CREATE UNIQUE INDEX `permissions_name_guard_name_unique` on `permissions` (`name`, `guard_name`);
CREATE UNIQUE INDEX `roles_name_guard_name_unique` on `roles` (`name`, `guard_name`);
CREATE INDEX `model_has_permissions_model_id_model_type_index` on `model_has_permissions` (`model_id`, `model_type`);
CREATE INDEX `model_has_roles_model_id_model_type_index` on `model_has_roles` (`model_id`, `model_type`);
CREATE UNIQUE INDEX `exams_code_unique` on `exams` (`code`);
CREATE UNIQUE INDEX `exam_sessions_exam_id_exam_participant_id_unique` on `exam_sessions` (`exam_id`, `exam_participant_id`);

