id(); $table->foreignId('test_id')->constrained()->onDelete('cascade'); $table->enum('type', ['single_choice', 'multiple_choice', 'input', 'matching'])->default('single_choice'); $table->text('question_text'); $table->text('explanation')->nullable(); $table->integer('score')->default(1); $table->integer('sort_order')->default(0); $table->boolean('is_required')->default(true); $table->timestamps(); $table->index('test_id'); $table->index('type'); }); } public function down(): void { Schema::dropIfExists('questions'); } };