feed_entries table
The feed_entries table in the Social Media Database Schema schema has 7 columns, keyed by id, with 3 foreign keys to users and posts.
The materialised timeline, written on fan-out. reason and source_user_id are what let the UI say why a post is here.
Columns (7)
Columns of the feed_entries table| Column | Type | Constraints | Description |
|---|
| id | uuid | primary key | |
|---|
| user_id | uuid | not null, references users.id | |
|---|
| post_id | uuid | not null, references posts.id | |
|---|
| reason | feed_reason | not null | |
|---|
| source_user_id | uuid | references users.id | |
|---|
| score | real | | |
|---|
| created_at | timestamptz | not null | |
|---|
Indexes (2)
(user_id, created_at) (user_id, post_id) unique
Relationships
feed_entries.user_id references users.idfeed_entries.post_id references posts.idfeed_entries.source_user_id references users.id