craigkai / volleyhub

Management software for 716 Volleyball!
https://volleyhub.vercel.app
9 stars 1 forks source link

Create database table for games #5

Closed craigkai closed 11 months ago

craigkai commented 1 year ago

This should be a database table that stores games played it should have:

* Date
* Team1 -- Foreign key
* Team2 -- Foreign key
* Results -- This needs some thought, do we make this a JSON blob?
* Session ID

This can be done via the Supabase UI.

renderorange commented 1 year ago

What will session id be used for in this table?

craigkai commented 1 year ago

Session isn't like a web session but instead a "season" where a session can be a few weeeks long of week play

renderorange commented 1 year ago

Ah I see, thanks for the explanation.

renderorange commented 1 year ago
Results -- This needs some thought, do we make this a JSON blob?

IMO, JSON blob should be used for variable data sets. If you know the columns you want to store for results, it's usually always better to just create the table with those columns.

craigkai commented 1 year ago
Results -- This needs some thought, do we make this a JSON blob?

IMO, JSON blob should be used for variable data sets. If you know the columns you want to store for results, it's usually always better to just create the table with those columns.

Yeah I agree, it just feels odd to have a "team1" and "team2" col

renderorange commented 1 year ago
Yeah I agree, it just feels odd to have a "team1" and "team2" col

Is there more data to capture for the teams, like home and away? Or is this just to literally capture 2 different teams? Were you thinking something like an array with 2 members to store the team ids?

How do you think this data will be used is probably a better question to define what it should look like.