-- Additional opaque digest of cache_key for correlation without exposing structured key material.
ALTER TABLE gateway_operation_log
    ADD COLUMN IF NOT EXISTS cache_key_hashed text;

CREATE INDEX IF NOT EXISTS idx_gateway_operation_log_cache_key_hashed
    ON gateway_operation_log (cache_key_hashed)
    WHERE cache_key_hashed IS NOT NULL;
