CREATE TABLE IF NOT EXISTS rum_web_vitals_events (
  id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  metric_name VARCHAR(16) NOT NULL,
  metric_value_ms DOUBLE NULL,
  session_id VARCHAR(64) NOT NULL,
  page_path VARCHAR(512) NULL,
  user_agent VARCHAR(255) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  KEY idx_rum_metric_created (metric_name, created_at),
  KEY idx_rum_session_created (session_id, created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
