<?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('custom_orders', function (Blueprint $table) {
            // Add proof approval fields if they don't exist
            if (!Schema::hasColumn('custom_orders', 'proof_approved')) {
                $table->boolean('proof_approved')->default(false);
                $table->timestamp('proof_approved_at')->nullable();
            }
        });
    }

    public function down(): void
    {
        Schema::table('custom_orders', function (Blueprint $table) {
            $table->dropColumn(['proof_approved', 'proof_approved_at']);
        });
    }
};
