CREATE TABLE IF NOT EXISTS `page_views` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `session_id` VARCHAR(255) NOT NULL,
  `ip` VARCHAR(64) NOT NULL,
  `user_agent` TEXT NULL,
  `page_url` TEXT NOT NULL,
  `visited_at` DATETIME NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `idx_session` (`session_id`),
  INDEX `idx_ip` (`ip`),
  INDEX `idx_visited_at` (`visited_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
