<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        // Update the status enum to include statuses for both inward and outward gate passes
        DB::statement("ALTER TABLE gate_passes MODIFY status ENUM('open','closed','draft','issued','completed','cancelled') NOT NULL DEFAULT 'open'");
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Revert the status enum to the previous values
        DB::statement("ALTER TABLE gate_passes MODIFY status ENUM('open','closed') NOT NULL DEFAULT 'open'");
    }
};
