<?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('proceso_acabados', function (Blueprint $table) {
            $table->json('distribucion_proveedores')->nullable()->after('proveedor_id');
            $table->boolean('terminada')->default(false)->after('fecha_recepcion');
        });
    }

    public function down(): void
    {
        Schema::table('proceso_acabados', function (Blueprint $table) {
            $table->dropColumn(['distribucion_proveedores', 'terminada']);
        });
    }
};
