<?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->string('sub_estado_taller')->nullable()->after('estado_actual');
        });

        Schema::table('estado_historico', function (Blueprint $table) {
            $table->string('sub_estado_taller')->nullable()->after('estado');
        });
    }

    public function down(): void
    {
        Schema::table('casos', function (Blueprint $table) {
            $table->dropColumn('sub_estado_taller');
        });

        Schema::table('estado_historico', function (Blueprint $table) {
            $table->dropColumn('sub_estado_taller');
        });
    }
};
