<?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
    {
        // Adaugă 'restore' la enum-ul action
        \DB::statement("ALTER TABLE `powerdns_changelog` MODIFY COLUMN `action` ENUM('create', 'update', 'delete', 'activate', 'deactivate', 'restore', 'view_zones', 'view_zone', 'view_records', 'view_record', 'edit_form', 'create_form', 'view_changelog', 'view_activity_log') NOT NULL");
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Elimină 'restore' din enum-ul action
        \DB::statement("ALTER TABLE `powerdns_changelog` MODIFY COLUMN `action` ENUM('create', 'update', 'delete', 'activate', 'deactivate', 'view_zones', 'view_zone', 'view_records', 'view_record', 'edit_form', 'create_form', 'view_changelog', 'view_activity_log') NOT NULL");
    }
};
