<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('managed_environments', function (Blueprint $table) {
            $table->string('rbac_role_definition_id')->nullable()->after('rbac_role_assignment_id');
            $table->string('rbac_role_display_name')->nullable()->after('rbac_role_definition_id');
        });
    }

    public function down(): void
    {
        Schema::table('managed_environments', function (Blueprint $table) {
            $table->dropColumn(['rbac_role_definition_id', 'rbac_role_display_name']);
        });
    }
};
