<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        DB::statement("ALTER TABLE dsars MODIFY COLUMN status ENUM(
            'draft',
            'approved',
            'needs posting',
            'failed',
            'sent',
            'completed',
            'acknowledged',
            'clarified'
        ) NOT NULL DEFAULT 'draft'");
    }

    public function down(): void
    {
        DB::statement("ALTER TABLE dsars MODIFY COLUMN status ENUM(
            'draft',
            'approved',
            'needs posting',
            'failed',
            'sent',
            'completed'
        ) NOT NULL DEFAULT 'draft'");
    }
};
