<?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('server_resources', function (Blueprint $table) {
            $table->boolean('allow_copy_temp_password')
                ->default(false)
                ->after('protocols')
                ->comment('是否允许用户复制临时密码');
        });
    }

    public function down(): void
    {
        Schema::table('server_resources', function (Blueprint $table) {
            $table->dropColumn('allow_copy_temp_password');
        });
    }
};
