<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        // Remove 'investigating' and 'written_off' statuses, keeping only 'reported', 'approved', 'settled'
        DB::statement("ALTER TABLE damaged_items MODIFY COLUMN status ENUM('reported', 'approved', 'settled') DEFAULT 'reported'");
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Restore original statuses
        DB::statement("ALTER TABLE damaged_items MODIFY COLUMN status ENUM('reported', 'investigating', 'approved', 'settled', 'written_off') DEFAULT 'reported'");
    }
};
