Skip to content

Add database schema for best-of-3 scoring #29

@JvmName

Description

@JvmName

Move from continuous riding time to discrete point-based scoring with best-of-3 rounds.

Note: I don't feel strongly about how we track each round winner, this is just a suggestion on how to do it.

Migrations needed:

  1. Update matches table:
+ round_1_winner_id (UUID, nullable)
+ round_2_winner_id (UUID, nullable)  
+ round_3_winner_id (UUID, nullable)
+ match_winner_id (UUID, nullable)
+ status (ENUM: 'pending', 'in_progress', 'completed')
- red_score
- blue_score
  1. Update rounds table:
+ round_index (INTEGER, NOT NULL)
+ duration_seconds (INTEGER, NOT NULL)
+ point_threshold (INTEGER, NOT NULL)
+ red_points (INTEGER, DEFAULT 0)
+ blue_points (INTEGER, DEFAULT 0)
+ winner_id (UUID, nullable)
+ end_method (ENUM: 'submission', 'stoppage', 'techfall', 'points', null)
+ started_at (DATE)

No changes needed to riding_time_votes table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions