feat(tournaments): add partnership tracking and tournament management
Implement comprehensive partnership tracking system and tournament management features including round-robin, single/double elimination, and Swiss system pairings. Changes: - Add partnership_games and partnership_stats tables - Implement PartnershipTracker service for recording partnership data - Add tournament generator with multiple formats - Create tournament management actions and views - Add acceptance tests for partnership tracking - Fix PartnershipTracker to use single snapshot per player per match - Fix round-robin test to query by round_number instead of hardcoded ID Note: All 8 acceptance tests now passing
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
ROM::SQL.migration do
|
||||
change do
|
||||
create_table :bracket_matchups do
|
||||
primary_key :id
|
||||
foreign_key :event_id, :events, null: false
|
||||
foreign_key :round_id, :tournament_rounds, null: false
|
||||
foreign_key :match_id, :matches
|
||||
foreign_key :team_1_id, :teams
|
||||
foreign_key :team_2_id, :teams
|
||||
column :bracket_position, Integer
|
||||
column :winner_team_id, Integer
|
||||
column :loser_team_id, Integer
|
||||
end
|
||||
|
||||
add_index :bracket_matchups, [:event_id, :round_id, :bracket_position], unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user