=== إصلاح foreign key يدوياً === فحص foreign keys الحالية في جدول groups... Foreign keys موجودة: - groups_instructor_id_foreign: instructor_id -> instructors.id إضافة foreign key جديد... ❌ خطأ: SQLSTATE[HY000]: General error: 1005 Can't create table `aischool_school`.`groups` (errno: 121 "Duplicate key on write or update") (Connection: mysql, Host: 127.0.0.1, Port: 3306, Database: aischool_school, SQL: ALTER TABLE groups ADD CONSTRAINT groups_instructor_id_foreign FOREIGN KEY (instructor_id) REFERENCES instructors(id) ON DELETE SET NULL ) ✅ Foreign key موجود بالفعل - لا حاجة لإضافته الآن يمكنك تشغيل: 1. حذف migration المشكلة: rm database/migrations/2026_01_11_164218_fix_groups_instructor_foreign_key.php 2. تشغيل باقي migrations: php artisan migrate