<?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
    {
        Schema::table('role_menu', function (Blueprint $table) {
            $table->boolean('allow_show')->default(true)->after('menu_id');
            $table->boolean('allow_create')->default(true)->after('allow_show');
            $table->boolean('allow_update')->default(true)->after('allow_create');
            $table->boolean('allow_destroy')->default(true)->after('allow_update');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('role_menu', function (Blueprint $table) {
            $table->dropColumn(['allow_show','allow_create', 'allow_update', 'allow_destroy']);
        });
    }
};
