thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
499 stars 30 forks source link

Normalize comment data #105

Closed pbrisbin closed 6 years ago

pbrisbin commented 9 years ago

Having all data in a single comments table will be difficult to scale as we add features. The general sense is that breaking out a few more tables would be a Good Idea and we should do it sooner rather than later before we accrue more data and build more features on top of the current model layer.

Proposed structure:

Article
  path (default: location.path)
  title (default: document.title)
  author
  belongs_to Site

Thread
  name (generated from paragraph content from client-side)
  belongs_to Article

Comment
  body
  created
  belongs_to Thread
  belongs_to User