<?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
    {
        // Using raw SQL to modify column to avoid Doctrine DBAL dependency issues
        DB::statement("ALTER TABLE news MODIFY COLUMN category ENUM('patch', 'download', 'guide', 'promo', 'event') NOT NULL DEFAULT 'patch'");
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Revert to original categories (warning: this might fail if data exists with new categories)
        DB::statement("ALTER TABLE news MODIFY COLUMN category ENUM('patch', 'download', 'promo') NOT NULL DEFAULT 'patch'");
    }
};
