<?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('casos', function (Blueprint $table) {
            $table->json('informe_data')->nullable()->after('ajustador_archivos');
            $table->boolean('informe_enviado')->default(false)->after('informe_data');
            $table->datetime('informe_enviado_at')->nullable()->after('informe_enviado');
        });
    }

    public function down(): void
    {
        Schema::table('casos', function (Blueprint $table) {
            $table->dropColumn(['informe_data', 'informe_enviado', 'informe_enviado_at']);
        });
    }
};
