id(); $table->foreignId('academic_year_id')->constrained()->cascadeOnUpdate()->restrictOnDelete(); $table->foreignId('department_id')->constrained()->cascadeOnUpdate()->restrictOnDelete(); $table->string('name', 100); $table->string('level', 10); $table->string('homeroom_teacher', 100)->nullable(); $table->unsignedInteger('capacity')->nullable(); $table->boolean('is_active')->default(true); $table->timestamps(); $table->unique(['academic_year_id', 'name']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('classes'); } };