topic_views table
The topic_views table in the Forum Database Schema schema has 5 columns, keyed by id, with 1 foreign key to topics.
Pre-aggregated per topic per day, not one row per hit. topics.view_count is the running total of this table.
Columns (5)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| topic_id | uuid | not null, references topics.id | |
| viewed_on | date | not null | |
| view_count | integer | not null | |
| unique_count | integer | not null |
Indexes (1)
(topic_id, viewed_on)unique
Relationships
topic_views.topic_idreferencestopics.id