<?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('servers', function (Blueprint $table) {
            // TOFU host-key pin (public key string from phpseclib getServerPublicHostKey()).
            $table->text('ssh_host_key')->nullable()->after('ssh_port');
        });
    }

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