CREATE TABLE IF NOT EXISTS video_view_log (
    video_id INT UNSIGNED NOT NULL,
    viewer_hash BINARY(16) NOT NULL,
    viewed_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (video_id, viewer_hash),
    KEY idx_viewed_at (viewed_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
