iankronquist / y-cloninator

List GitHub projects trending on Hacker News without distractions.
http://ycloninator.herokuapp.com/
MIT License
127 stars 13 forks source link

Handle multiple mentions of a repository on the backend #8

Closed mshenfield closed 8 years ago

mshenfield commented 8 years ago

It would be nice to be able to see how multiple popular posts reference the same repository, and when a repository was first and last mentioned. The schema would be more suited for this task if it switched the relationship of Github Repository to HNPost from 1:1, to 1:many. This would mean moving the hn_id and hn_url from ghprojects, and adding a gh_url into hnposts. You could either store first and last mentioned, and number of links, or compute it as part of the query when displaying.

tschuy commented 8 years ago

Closed by #9, thanks for your PR :smile: