<?php

use App\Models\SecurityManagement\Role;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Spatie\Permission\Models\Permission;

return new class extends Migration {

    public function up(){
        Schema::whenTableDoesntHaveColumn((new Permission)->getTable(),"description",function (Blueprint $table){
            $table->string("description")->nullable();
        });

        Schema::whenTableDoesntHaveColumn((new Role)->getTable(),"description",function (Blueprint $table){
            $table->string("description")->nullable();
        });
    }

};
