-- Node capacity declaration for multi-node scheduling (v0.2 P02).
-- Loaded from `~/.orca/node.hcl` at `orca node join` and updated via
-- `orca node capacity --set`. Read by the dispatcher for bin-packing.
CREATE TABLE IF NOT EXISTS node_capacity (
    node_id         TEXT PRIMARY KEY,
    cpu_millicores  INTEGER NOT NULL,
    memory_mib      INTEGER NOT NULL,
    disk_mib        INTEGER NOT NULL,
    updated_at      DATETIME NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_capacity_updated ON node_capacity(updated_at);
