jam941 / JamboreeScoreboard

1 stars 0 forks source link

Potentially reverse score/scout and score/troop relationship #3

Open ChrisSoper1 opened 4 years ago

ChrisSoper1 commented 4 years ago

https://github.com/jam941/JamboreeScoreboard/blob/008cdfa4f4e7912721377e556378f7a2ddf1111c/backend/models.py#L40

I think it may make sense to have scores foreign key to scouts or troops, instead of the other way around. That would enable this to work without requiring to grant anyone the ability to edit scores.

We would then use insert to add a score, instead of update, then just have a sum() function in the select query.

jam941 commented 4 years ago

We can talk about this the next time we meet. I think I understand what you are trying to say but before I make any changes I want to clarify