<?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
    {
        // Proxmox node name (from RegisterCapacity), used by Subsystem B to
        // address qemu/{node}/... endpoints. Nullable until a host is active.
        Schema::table('hosts', function (Blueprint $table) {
            $table->string('node')->nullable()->after('pve_version');
        });
    }

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