<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('inspections', function (Blueprint $table) {
            $table->json('source_image_paths')->nullable()->after('completed_at');
            $table->json('visualization_image_paths')->nullable()->after('source_image_paths');
            $table->json('roboflow_output_keys')->nullable()->after('visualization_image_paths');
            $table->json('roboflow_outputs')->nullable()->after('roboflow_output_keys');
        });
    }

    public function down(): void
    {
        Schema::table('inspections', function (Blueprint $table) {
            $table->dropColumn([
                'source_image_paths',
                'visualization_image_paths',
                'roboflow_output_keys',
                'roboflow_outputs',
            ]);
        });
    }
};
