-- Add persona tracking fields for council agents and brief metadata for councils

ALTER TABLE council_agents
    ADD COLUMN IF NOT EXISTS persona_status VARCHAR(50) NOT NULL DEFAULT 'pending',
    ADD COLUMN IF NOT EXISTS persona_loaded_at TIMESTAMPTZ,
    ADD COLUMN IF NOT EXISTS persona_ack_payload JSONB,
    ADD COLUMN IF NOT EXISTS endpoint_url TEXT;

ALTER TABLE councils
    ADD COLUMN IF NOT EXISTS brief_owner_role VARCHAR(100),
    ADD COLUMN IF NOT EXISTS brief_dispatched_at TIMESTAMPTZ,
    ADD COLUMN IF NOT EXISTS activation_payload JSONB;
