-- Keyed JSON state for Broadcom Automation API surface (DB-backed stubs).

CREATE TABLE vsphere_api_state (
    state_key text PRIMARY KEY,
    verb text NOT NULL,
    path_template text NOT NULL,
    payload jsonb NOT NULL DEFAULT '{}'::jsonb,
    updated_at timestamptz NOT NULL DEFAULT now()
);

CREATE INDEX vsphere_api_state_path_idx ON vsphere_api_state (path_template);
CREATE INDEX vsphere_api_state_verb_idx ON vsphere_api_state (verb);
