From 99d399d36c192725edba9a3fcebdfcc3f366170e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2026 18:09:35 -0400 Subject: [PATCH] update migration table --- ...02_23_204050_create_midterm_exam_table.php | 60 +----- ...create_parent_attendance_reports_table.php | 43 ---- ...create_payment_notification_logs_table.php | 33 --- ...04106_create_paypal_transactions_table.php | 47 ----- ..._23_204112_create_print_requests_table.php | 98 --------- ...3_204125_create_role_permissions_table.php | 25 --- ...026_02_23_204127_create_sections_table.php | 51 ----- ...026_02_23_204129_create_settings_table.php | 21 -- ...2_23_204134_create_student_class_table.php | 19 -- ...reate_whatsapp_group_memberships_table.php | 29 --- ...23_900010_create_calendar_events_table.php | 20 -- ...2026_02_23_900017_create_classes_table.php | 51 ----- ...02_23_900021_create_competitions_table.php | 196 ----------------- ...026_02_23_900038_create_families_table.php | 197 ------------------ ...3_900054_create_support_requests_table.php | 66 ------ 15 files changed, 1 insertion(+), 955 deletions(-) diff --git a/database/migrations/2026_02_23_204050_create_midterm_exam_table.php b/database/migrations/2026_02_23_204050_create_midterm_exam_table.php index 6c909402..05e0a3e2 100644 --- a/database/migrations/2026_02_23_204050_create_midterm_exam_table.php +++ b/database/migrations/2026_02_23_204050_create_midterm_exam_table.php @@ -22,64 +22,6 @@ CREATE TABLE `midterm_exam` ( `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `migrations` --- - - -CREATE TABLE `migrations` ( - -`id` int UNSIGNED NOT NULL, - - `version` varchar(255) NOT NULL, - - `class` varchar(255) NOT NULL, - - `group` varchar(255) NOT NULL, - - `namespace` varchar(255) NOT NULL, - - `time` int NOT NULL, - - `batch` int UNSIGNED NOT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `missing_score_overrides` --- - - -CREATE TABLE `missing_score_overrides` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `class_section_id` int UNSIGNED NOT NULL, - - `semester` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, - - `school_year` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, - - `item_type` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, - - `item_index` int DEFAULT NULL, - - `is_allowed` tinyint(1) NOT NULL DEFAULT '0', - - `updated_by` int UNSIGNED DEFAULT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; SQL ); @@ -101,4 +43,4 @@ SQL { Schema::dropIfExists('midterm_exam'); } -}; \ No newline at end of file +}; diff --git a/database/migrations/2026_02_23_204054_create_parent_attendance_reports_table.php b/database/migrations/2026_02_23_204054_create_parent_attendance_reports_table.php index 6eb4e90c..29589abb 100644 --- a/database/migrations/2026_02_23_204054_create_parent_attendance_reports_table.php +++ b/database/migrations/2026_02_23_204054_create_parent_attendance_reports_table.php @@ -26,49 +26,6 @@ CREATE TABLE `parent_attendance_reports` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `parent_meeting_schedules` --- - - -CREATE TABLE `parent_meeting_schedules` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `parent_user_id` int UNSIGNED NOT NULL, - - `parent_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - - `student_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - - `class_section_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - - `date` date NOT NULL, - - `time` time NOT NULL, - - `notes` text COLLATE utf8mb4_unicode_ci, - - `semester` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, - - `school_year` varchar(9) COLLATE utf8mb4_unicode_ci NOT NULL, - - `status` enum('pending','approved','rejected','cancelled','completed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending', - - `created_by` int UNSIGNED DEFAULT NULL, - - `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - - `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `parent_attendance_reports` ADD PRIMARY KEY (`id`), diff --git a/database/migrations/2026_02_23_204104_create_payment_notification_logs_table.php b/database/migrations/2026_02_23_204104_create_payment_notification_logs_table.php index be1019bd..2584964b 100644 --- a/database/migrations/2026_02_23_204104_create_payment_notification_logs_table.php +++ b/database/migrations/2026_02_23_204104_create_payment_notification_logs_table.php @@ -29,39 +29,6 @@ CREATE TABLE `payment_notification_logs` ( `sent_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `payment_transactions` --- - - -CREATE TABLE `payment_transactions` ( - -`id` int UNSIGNED NOT NULL, - - `transaction_id` varchar(100) COLLATE utf8mb4_general_ci NOT NULL, - - `payment_id` int NOT NULL, - - `transaction_date` datetime DEFAULT CURRENT_TIMESTAMP, - - `amount` decimal(10,2) NOT NULL, - - `payment_method` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, - - `payment_status` varchar(50) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Pending', - - `transaction_fee` decimal(10,2) DEFAULT '0.00', - - `school_year` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL, - - `semester` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `payment_notification_logs` ADD PRIMARY KEY (`id`), diff --git a/database/migrations/2026_02_23_204106_create_paypal_transactions_table.php b/database/migrations/2026_02_23_204106_create_paypal_transactions_table.php index aee386c6..85fa7869 100644 --- a/database/migrations/2026_02_23_204106_create_paypal_transactions_table.php +++ b/database/migrations/2026_02_23_204106_create_paypal_transactions_table.php @@ -29,53 +29,6 @@ CREATE TABLE `paypal_transactions` ( `semester` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `permissions` --- - - -CREATE TABLE `permissions` ( - -`id` int UNSIGNED NOT NULL, - - `name` varchar(255) NOT NULL, - - `description` text, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `placement_batches` --- - - -CREATE TABLE `placement_batches` ( - -`id` int UNSIGNED NOT NULL, - - `placement_test` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, - - `school_year` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, - - `created_by` int UNSIGNED DEFAULT NULL, - - `updated_by` int UNSIGNED DEFAULT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -SQL - ); App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `paypal_transactions` diff --git a/database/migrations/2026_02_23_204112_create_print_requests_table.php b/database/migrations/2026_02_23_204112_create_print_requests_table.php index 8c8c83fa..202502e8 100644 --- a/database/migrations/2026_02_23_204112_create_print_requests_table.php +++ b/database/migrations/2026_02_23_204112_create_print_requests_table.php @@ -24,104 +24,6 @@ CREATE TABLE `print_requests` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `project` --- - - -CREATE TABLE `project` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int NOT NULL, - - `school_id` char(36) NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `updated_by` int NOT NULL, - - `project_index` tinyint DEFAULT NULL, - - `score` float DEFAULT NULL, - - `comment` text, - - `semester` varchar(25) NOT NULL, - - `school_year` varchar(9) DEFAULT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `promotion_queue` --- - - -CREATE TABLE `promotion_queue` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `from_class_section_id` int UNSIGNED DEFAULT NULL, - - `to_class_id` int UNSIGNED NOT NULL, - - `to_class_section_id` int UNSIGNED DEFAULT NULL, - - `school_year_from` varchar(9) NOT NULL, - - `school_year_to` varchar(9) NOT NULL, - - `status` enum('queued','assigned','applied','cancelled') NOT NULL DEFAULT 'queued', - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL, - - `updated_by` int UNSIGNED DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `qcmquestions` --- - - -CREATE TABLE `qcmquestions` ( - -`id` int NOT NULL, - - `qcm_question_id` int NOT NULL, - - `question_id` int NOT NULL, - - `answer_a` text COLLATE utf8mb4_unicode_ci NOT NULL, - - `answer_b` text COLLATE utf8mb4_unicode_ci NOT NULL, - - `answer_c` text COLLATE utf8mb4_unicode_ci, - - `answer_d` text COLLATE utf8mb4_unicode_ci, - - `answer_e` text COLLATE utf8mb4_unicode_ci, - - `correct_answer` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -SQL - ); App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `print_requests` diff --git a/database/migrations/2026_02_23_204125_create_role_permissions_table.php b/database/migrations/2026_02_23_204125_create_role_permissions_table.php index 22d5d58f..3a58ede8 100644 --- a/database/migrations/2026_02_23_204125_create_role_permissions_table.php +++ b/database/migrations/2026_02_23_204125_create_role_permissions_table.php @@ -22,31 +22,6 @@ CREATE TABLE `role_permissions` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `scan_log` --- - - -CREATE TABLE `scan_log` ( - -`id` int UNSIGNED NOT NULL, - - `user_id` int NOT NULL, - - `card_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, - - `scan_time` datetime DEFAULT CURRENT_TIMESTAMP, - - `school_year` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL, - - `semester` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `role_permissions` ADD PRIMARY KEY (`id`); diff --git a/database/migrations/2026_02_23_204127_create_sections_table.php b/database/migrations/2026_02_23_204127_create_sections_table.php index 8365fd54..fd8c03b1 100644 --- a/database/migrations/2026_02_23_204127_create_sections_table.php +++ b/database/migrations/2026_02_23_204127_create_sections_table.php @@ -17,57 +17,6 @@ CREATE TABLE `sections` ( `updated_by` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `semester_scores` --- - - -CREATE TABLE `semester_scores` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int NOT NULL, - - `school_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `updated_by` int DEFAULT NULL, - - `homework_avg` float DEFAULT NULL, - - `quiz_avg` float DEFAULT NULL, - - `project_avg` float DEFAULT NULL, - - `midterm_exam_score` float DEFAULT NULL, - - `final_exam_score` float DEFAULT NULL, - - `attendance_score` float DEFAULT NULL, - - `participation_score` float DEFAULT NULL, - - `ptap_score` decimal(5,2) DEFAULT NULL, - - `test_avg` float DEFAULT NULL, - - `semester_score` float DEFAULT NULL, - - `semester` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, - - `school_year` varchar(9) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - - `created_at` datetime DEFAULT CURRENT_TIMESTAMP, - - `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `sections` ADD PRIMARY KEY (`id`); diff --git a/database/migrations/2026_02_23_204129_create_settings_table.php b/database/migrations/2026_02_23_204129_create_settings_table.php index e3ed2c67..1e78e789 100644 --- a/database/migrations/2026_02_23_204129_create_settings_table.php +++ b/database/migrations/2026_02_23_204129_create_settings_table.php @@ -18,27 +18,6 @@ CREATE TABLE `settings` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `shortanswerquestions` --- - - -CREATE TABLE `shortanswerquestions` ( - -`id` int NOT NULL, - - `sa_question_id` int NOT NULL, - - `question_id` int NOT NULL, - - `correct_answer` text COLLATE utf8mb4_unicode_ci NOT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `settings` ADD PRIMARY KEY (`id`); diff --git a/database/migrations/2026_02_23_204134_create_student_class_table.php b/database/migrations/2026_02_23_204134_create_student_class_table.php index dee1e5fe..0e7c3d27 100644 --- a/database/migrations/2026_02_23_204134_create_student_class_table.php +++ b/database/migrations/2026_02_23_204134_create_student_class_table.php @@ -22,25 +22,6 @@ CREATE TABLE `student_class` ( `updated_by` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `student_medical_conditions` --- - - -CREATE TABLE `student_medical_conditions` ( - -`id` int NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `condition_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `student_class` ADD PRIMARY KEY (`id`); diff --git a/database/migrations/2026_02_23_204145_create_whatsapp_group_memberships_table.php b/database/migrations/2026_02_23_204145_create_whatsapp_group_memberships_table.php index 3d054cef..00f6fe11 100644 --- a/database/migrations/2026_02_23_204145_create_whatsapp_group_memberships_table.php +++ b/database/migrations/2026_02_23_204145_create_whatsapp_group_memberships_table.php @@ -23,35 +23,6 @@ CREATE TABLE `whatsapp_group_memberships` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `whatsapp_invites_log` --- - - -CREATE TABLE `whatsapp_invites_log` ( - -`id` int NOT NULL, - - `parent_id` int NOT NULL, - - `email` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `link_id` int DEFAULT NULL, - - `status` varchar(20) COLLATE utf8mb4_general_ci NOT NULL, - - `error_message` text COLLATE utf8mb4_general_ci, - - `sent_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `whatsapp_group_memberships` ADD PRIMARY KEY (`id`), diff --git a/database/migrations/2026_02_23_900010_create_calendar_events_table.php b/database/migrations/2026_02_23_900010_create_calendar_events_table.php index d5468244..ffc2dfe7 100644 --- a/database/migrations/2026_02_23_900010_create_calendar_events_table.php +++ b/database/migrations/2026_02_23_900010_create_calendar_events_table.php @@ -25,26 +25,6 @@ CREATE TABLE `calendar_events` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `chapters` --- - - -CREATE TABLE `chapters` ( - -`id` int UNSIGNED NOT NULL, - - `chapter_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL, - - `class_section_id` int NOT NULL, - - `school_year` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `calendar_events` diff --git a/database/migrations/2026_02_23_900017_create_classes_table.php b/database/migrations/2026_02_23_900017_create_classes_table.php index f4ea9b88..c9a10116 100644 --- a/database/migrations/2026_02_23_900017_create_classes_table.php +++ b/database/migrations/2026_02_23_900017_create_classes_table.php @@ -18,57 +18,6 @@ CREATE TABLE `classes` ( `school_year` varchar(9) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `classSection` --- - - -CREATE TABLE `classSection` ( - -`id` int UNSIGNED NOT NULL, - - `class_id` int UNSIGNED NOT NULL, - - `class_section_id` int UNSIGNED NOT NULL, - - `class_section_name` varchar(100) NOT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL, - - `semester` varchar(255) NOT NULL, - - `school_year` varchar(9) DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `class_preparation_log` --- - - -CREATE TABLE `class_preparation_log` ( - -`id` int UNSIGNED NOT NULL, - - `class_section_id` int UNSIGNED NOT NULL, - - `class_section` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, - - `school_year` varchar(9) COLLATE utf8mb4_general_ci NOT NULL, - - `prep_data` text COLLATE utf8mb4_general_ci NOT NULL, - - `created_at` datetime DEFAULT CURRENT_TIMESTAMP - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `classes` diff --git a/database/migrations/2026_02_23_900021_create_competitions_table.php b/database/migrations/2026_02_23_900021_create_competitions_table.php index 254d4d60..60be6362 100644 --- a/database/migrations/2026_02_23_900021_create_competitions_table.php +++ b/database/migrations/2026_02_23_900021_create_competitions_table.php @@ -30,202 +30,6 @@ CREATE TABLE `competitions` ( `locked_by` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `competition_class_winners` --- - - -CREATE TABLE `competition_class_winners` ( - -`id` int UNSIGNED NOT NULL, - - `competition_id` int UNSIGNED NOT NULL, - - `class_section_id` int NOT NULL, - - `winners_override` int DEFAULT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL, - - `question_count` int DEFAULT NULL, - - `prize_1` decimal(10,2) DEFAULT NULL, - - `prize_2` decimal(10,2) DEFAULT NULL, - - `prize_3` decimal(10,2) DEFAULT NULL, - - `prize_4` decimal(10,2) DEFAULT NULL, - - `prize_5` decimal(10,2) DEFAULT NULL, - - `prize_6` decimal(10,2) DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `competition_scores` --- - - -CREATE TABLE `competition_scores` ( - -`id` int UNSIGNED NOT NULL, - - `competition_id` int UNSIGNED NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `score` decimal(6,2) NOT NULL DEFAULT '0.00', - - `notes` varchar(255) DEFAULT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `competition_winners` --- - - -CREATE TABLE `competition_winners` ( - -`id` int UNSIGNED NOT NULL, - - `competition_id` int UNSIGNED NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `rank` int NOT NULL, - - `score` decimal(6,2) NOT NULL DEFAULT '0.00', - - `prize_amount` decimal(10,2) NOT NULL DEFAULT '0.00', - - `created_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `configuration` --- - - -CREATE TABLE `configuration` ( - -`id` int UNSIGNED NOT NULL, - - `config_key` varchar(100) NOT NULL, - - `config_value` varchar(100) NOT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- --- Dumping data for table `configuration` --- - -INSERT INTO `configuration` (`id`, `config_key`, `config_value`) VALUES -(1, 'date_age_reference', '2025-12-31'), -(2, 'stickerWidth', '102'), -(3, 'stickerHeight', '34'), -(4, 'pageWidth', '216'), -(5, 'pageHeight', '280'), -(6, 'leftMargin', '4'), -(7, 'topMargin', '19'), -(8, 'horizontalGap', '5'), -(9, 'verticalGap', '0'), -(10, 'enable_attendance', '0'), -(11, 'due_date', '2025-09-21'), -(12, 'max_emergency', '1'), -(13, 'pass_score', '60'), -(14, 'weeks_study', '35'), -(15, 'last_school_day', '2026-06-01'), -(16, 'max_age', '18'), -(17, 'min_age', '5'), -(18, 'trophy_score', '94'), -(19, 'max_kids', '5'), -(20, 'cleanup_timeout', '900'), -(21, 'enrollment_deadline', '2025-10-06'), -(22, 'school_year', '2025-2026'), -(23, 'Youth_fee', '200'), -(24, 'second_student_fee', '220'), -(25, 'first_student_fee', '370'), -(26, 'total_semester1_days', '14'), -(27, 'semester', 'Spring'), -(28, 'refund_deadline', '2025-12-31'), -(29, 'total_semester2_days', '13'), -(30, 'delete_email_notify', 'support@alrahmaisgl.org, melabidi@alrahmaisgl.org'), -(31, 'fall_semester_start', '2025-09-21'), -(32, 'sandbox_secret_paypal', 'Ar0Br3ZhBukQwwdSCxIcSveiu70-Ekt-qqF0nSyYNr3eRAYQKcWTTlhCAKncZiYXmBoPeo4IceV6FjT'), -(33, 'sandbox_verifylink_paypal', 'https://api-m.sandbox.paypal.com/v1/notifications/verify-webhook-signature'), -(34, 'sandbox_tokenurl_paypal', 'https://api-m.sandbox.paypal.com/v1/oauth2/token'), -(35, 'sandbox_clientid_paypal', 'AYsiOekZUvrjgx9C5c554ZeSQ4W6yd0ZX-OHE93_D0fWoa4YXrMmroEeLiAjjdCKkELH8EVZR_yGMLPS'), -(36, 'sandbox_webhookid_paypal', '0EU27043LC060650D'), -(37, 'production_verifylink_paypal', 'https://api-m.paypal.com/v1/notifications/verify-webhook-signature'), -(38, 'production_webhookid_paypal', '0H5876426L0092829'), -(39, 'production_secret_paypal', 'KKvmE-0cvwx8rEHnEcFaAvn1Rlc3cy07IGIjqGGPR8EqxABbmPodM_JrjRQq2SF2903A4q0DBjjUWai'), -(40, 'production_clientid_paypal', 'AQhCgmypaitgLgretMqNrh_7mEG5fAmwCECxCxevuLDQfsQVwECFyQOU50byzPzFrwd0cVVD8r2lujIB'), -(41, 'production_tokenurl_paypal', 'https://api-m.paypal.com/v1/oauth2/token'), -(42, 'comment_reviewer', 'administrator, principal'), -(43, 'paypal_mode', 'sandbox'), -(44, 'grade_fee', '10'), -(45, 'installment_date', '2026-03-01'), -(46, 'spring_semester_start', '2026-01-25'), -(47, 'parent_scores_released', '0'), -(48, 'last_day_of_school', '2026-05-31'), -(49, 'parent_scores_released_fall', '1'), -(50, 'parent_scores_released_spring', '0'), -(51, 'parent_report_cutoff', '09'); - --- -------------------------------------------------------- - --- --- Table structure for table `contactus` --- - - -CREATE TABLE `contactus` ( - -`id` int UNSIGNED NOT NULL, - - `sender_id` int UNSIGNED NOT NULL, - - `reciever_id` int UNSIGNED NOT NULL, - - `subject` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, - - `message` text COLLATE utf8mb4_general_ci NOT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL, - - `semester` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, - - `school_year` varchar(9) COLLATE utf8mb4_general_ci DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `competitions` ADD PRIMARY KEY (`id`), diff --git a/database/migrations/2026_02_23_900038_create_families_table.php b/database/migrations/2026_02_23_900038_create_families_table.php index 1079dde8..2bda16c6 100644 --- a/database/migrations/2026_02_23_900038_create_families_table.php +++ b/database/migrations/2026_02_23_900038_create_families_table.php @@ -27,203 +27,6 @@ CREATE TABLE `families` ( `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `family_comm_prefs` --- - - -CREATE TABLE `family_comm_prefs` ( - -`id` int UNSIGNED NOT NULL, - - `family_id` int UNSIGNED NOT NULL, - - `category` varchar(32) NOT NULL, - - `via_email` tinyint(1) NOT NULL DEFAULT '1', - - `via_sms` tinyint(1) NOT NULL DEFAULT '0', - - `cc_all_guardians` tinyint(1) NOT NULL DEFAULT '1', - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `family_guardians` --- - - -CREATE TABLE `family_guardians` ( - -`id` int UNSIGNED NOT NULL, - - `family_id` int UNSIGNED NOT NULL, - - `user_id` int UNSIGNED NOT NULL, - - `relation` varchar(32) NOT NULL DEFAULT 'guardian', - - `is_primary` tinyint(1) NOT NULL DEFAULT '0', - - `receive_emails` tinyint(1) NOT NULL DEFAULT '1', - - `receive_sms` tinyint(1) NOT NULL DEFAULT '0', - - `custody_notes` text, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `family_students` --- - - -CREATE TABLE `family_students` ( - -`id` int UNSIGNED NOT NULL, - - `family_id` int UNSIGNED NOT NULL, - - `student_id` int UNSIGNED NOT NULL, - - `is_primary_home` tinyint(1) NOT NULL DEFAULT '0', - - `notes` text, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `final_exam` --- - - -CREATE TABLE `final_exam` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int NOT NULL, - - `school_id` char(36) NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `updated_by` int NOT NULL, - - `score` float DEFAULT NULL, - - `semester` varchar(25) NOT NULL DEFAULT 'Spring', - - `school_year` varchar(9) DEFAULT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `final_score` --- - - -CREATE TABLE `final_score` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int NOT NULL, - - `school_id` char(36) NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `updated_by` int NOT NULL, - - `score` float NOT NULL, - - `score_letter` varchar(9) DEFAULT NULL, - - `comment` text, - - `school_year` varchar(9) NOT NULL, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL, - - `semester` varchar(255) NOT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `flag` --- - - -CREATE TABLE `flag` ( - -`id` int UNSIGNED NOT NULL, - - `student_id` int NOT NULL, - - `student_name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, - - `grade` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, - - `flag` enum('payment','attendance','grade','behavior','talking_off_task','calling_out','minor_disruption','minor_dress_code','forgetting_materials','repeated_defiance','disrespectful_tone','minor_profanity','repeated_tardiness','device_misuse','minor_conflict','bullying_harassment','fighting_aggression','threats','theft','vandalism','sexual_harassment','serious_cyber_incident','contraband','weapons_drugs','other') COLLATE utf8mb4_general_ci NOT NULL, - - `flag_datetime` datetime NOT NULL, - - `flag_state` enum('Closed','Canceled') COLLATE utf8mb4_general_ci NOT NULL, - - `updated_by_open` int DEFAULT NULL, - - `open_description` text COLLATE utf8mb4_general_ci, - - `updated_by_closed` int DEFAULT NULL, - - `close_description` text COLLATE utf8mb4_general_ci, - - `action_taken` text COLLATE utf8mb4_general_ci, - - `updated_by_canceled` int DEFAULT NULL, - - `cancel_description` text COLLATE utf8mb4_general_ci, - - `semester` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - - `school_year` varchar(9) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, - - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - - `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `families` diff --git a/database/migrations/2026_02_23_900054_create_support_requests_table.php b/database/migrations/2026_02_23_900054_create_support_requests_table.php index 1842a81f..b7f8c7ae 100644 --- a/database/migrations/2026_02_23_900054_create_support_requests_table.php +++ b/database/migrations/2026_02_23_900054_create_support_requests_table.php @@ -21,72 +21,6 @@ CREATE TABLE `support_requests` ( `school_year` varchar(9) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; --- -------------------------------------------------------- - --- --- Table structure for table `teacher_attendance_data` --- - - -CREATE TABLE `teacher_attendance_data` ( - -`id` int UNSIGNED NOT NULL, - - `class_section_id` int UNSIGNED NOT NULL, - - `teacher_id` int UNSIGNED NOT NULL, - - `position` enum('main','ta') NOT NULL, - - `date` date NOT NULL, - - `semester` varchar(25) NOT NULL, - - `school_year` varchar(25) NOT NULL, - - `status` enum('present','absent','late') NOT NULL, - - `reason` varchar(255) DEFAULT NULL, - - `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - - `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; - --- -------------------------------------------------------- - --- --- Table structure for table `teacher_class` --- - - -CREATE TABLE `teacher_class` ( - -`id` int UNSIGNED NOT NULL, - - `class_section_id` int DEFAULT NULL, - - `teacher_id` int DEFAULT NULL, - - `position` enum('main','ta') COLLATE utf8mb4_general_ci DEFAULT NULL, - - `semester` varchar(25) COLLATE utf8mb4_general_ci NOT NULL, - - `school_year` varchar(25) COLLATE utf8mb4_general_ci DEFAULT NULL, - - `description` text COLLATE utf8mb4_general_ci, - - `created_at` datetime DEFAULT NULL, - - `updated_at` datetime DEFAULT NULL, - - `updated_by` int DEFAULT NULL - -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -SQL - ); - App\Support\SqliteCompat::statement(<<<'SQL' ALTER TABLE `support_requests` ADD PRIMARY KEY (`id`);