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
ColumnTypeConstraintsDescription
iduuidprimary key
user_iduuidnot null, references users.id
post_iduuidnot null, references posts.id
reasonfeed_reasonnot null
source_user_iduuidreferences users.id
scorereal
created_attimestamptznot null

Indexes (2)

  • (user_id, created_at)
  • (user_id, post_id) unique

Relationships

  • feed_entries.user_id references users.id
  • feed_entries.post_id references posts.id
  • feed_entries.source_user_id references users.id