Skip to content

"Team" entity refactor #553

@sei-bstein

Description

@sei-bstein

We talk about this a lot internally, but I noticed we don't have an issue explicitly dedicated to it.

Currently, teams get an ID, but are not actual entities - they don't have a table and are thus not subject to typical relational constraints that can be useful for system stability, efficient queries, etc. This has caused a number of bugs over the years, and results in some pretty gnarly workarounds that result in DB denormalization.

Proposed solution is to:

  • Make Team a first-class entity
  • Move relevant fields from Player to it (session times, scores, challenge completion, team name, whatever else makes sense)
  • Create a FK constraint from player to team
  • Refactor to take advantage

This is a large lift but is really important for longterm application health. We'll address when it makes sense.

Metadata

Metadata

Assignees

Labels

choresKeeping our project tidy, current, and building

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions