-- Migration 114: Banner Analytics Enrichment
-- Adds user_agent to audit log for device classification + time-series index

ALTER TABLE compliance_banner_consent_audit_log
    ADD COLUMN IF NOT EXISTS user_agent TEXT;

CREATE INDEX IF NOT EXISTS idx_banner_audit_timeseries
    ON compliance_banner_consent_audit_log(tenant_id, site_id, action, created_at);
