<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    public function up()
{
    Schema::create('car_lab_reports', function (Blueprint $table) {
        $table->id();
        $table->unsignedBigInteger('car_id');
        $table->text('report_details');
        $table->string('report_type')->default('General'); // ✅ Add default value or make nullable
        $table->timestamps();

        $table->foreign('car_id')->references('id')->on('cars')->onDelete('cascade');
    });
}


    public function down()
    {
        Schema::dropIfExists('car_lab_reports');
    }
};
