live_threads table
The live_threads table in the Reddit Clone Database Schema schema has 9 columns, keyed by id, with 1 foreign key to users. 2 columns in live_thread_updates and live_thread_contributors reference it.
A running event feed that is deliberately not a post: updates arrive faster than voting makes sense, so there are no scores here at all.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| title | varchar(200) | not null | |
| description_md | varchar(1000) | ||
| created_by | uuid | references users.id | |
| state | live_thread_state | not null | |
| is_nsfw | boolean | not null | |
| viewer_count | integer | not null | |
| created_at | timestamptz | not null | |
| closed_at | timestamptz |
Indexes (1)
(state, created_at)
Relationships
live_threads.created_byreferencesusers.idlive_thread_updates.live_thread_idreferenceslive_threadslive_thread_contributors.live_thread_idreferenceslive_threads