title: Posts, comments, replies, and likes database schema
body: <p>I have a site where a users can comment on posts or reply to a comment. The user can also like replies or comments. However, there is another field called reply_to within the reply table. Here's my current schema:</p>
  
  <pre><code>Comment
  id
  user (foreign key)
  post (foreign key)
  comment
  
  Reply
  id
  user (foreign key)
  reply_to (who the user is replying to)
  comment (foreign key)
  reply
  
  CommentLike (Table that shows which user liked which comments)
  id
  comment (foreign key)
  user (foreign key)
  like (1 = likes, 0 = dislikes)
  
  ReplyLike (Table that shows which user liked which replies)
  id
  reply (foreign key)
  user (foreign key)
  like (1 = likes, 0 = dislikes)
  </code></pre>
  
  <p>Does this seem like a good schema to use, or is there a better way to create this sort of structure?</p>