Open Bibilidibipi opened 9 years ago
I've reworked the database design to have a "rewardings" association table between users and rewards and removed the supporter ID column from the projects table. Supporters are instead linked to projects through the rewards and rewardings tables (Project : Reward : Rewardings : Users).
You'll need a "supportings" table to create a has-many relationship between projects and supporters, and a similar link between projects and rewards. "projects" shouldn't need any foreign keys.