post_votes table
The post_votes table in the Reddit Clone Database Schema schema has 5 columns, with 2 foreign keys to users and posts.
value is +1 or -1 under a check constraint. The composite key makes a vote idempotent, so changing your mind is an UPDATE and un-voting is a DELETE rather than an accumulating pile of rows. Every count on posts is rebuildable from here.
Columns (5)
Indexes (2)
(post_id)(user_id, created_at)