@@ -766,11 +766,11 @@ BEGIN
766766 END LOOP;
767767
768768 -- Create brackets (semifinals + final)
769- INSERT INTO tournament_brackets (id, tournament_stage_id, tournament_team_id_1, tournament_team_id_2, round, match_number, finished)
769+ INSERT INTO tournament_brackets (id, tournament_stage_id, tournament_team_id_1, tournament_team_id_2, round, match_number, " group " , path , finished)
770770 VALUES
771- (t1_bracket_sf1, t1_stage_id, t1_team_ids[1 ], t1_team_ids[4 ], 1 , 1 , true),
772- (t1_bracket_sf2, t1_stage_id, t1_team_ids[2 ], t1_team_ids[3 ], 1 , 2 , true),
773- (t1_bracket_final, t1_stage_id, t1_team_ids[1 ], t1_team_ids[2 ], 2 , 1 , true);
771+ (t1_bracket_sf1, t1_stage_id, t1_team_ids[1 ], t1_team_ids[4 ], 1 , 1 , 1 , ' WB ' , true),
772+ (t1_bracket_sf2, t1_stage_id, t1_team_ids[2 ], t1_team_ids[3 ], 1 , 2 , 1 , ' WB ' , true),
773+ (t1_bracket_final, t1_stage_id, t1_team_ids[1 ], t1_team_ids[2 ], 2 , 1 , 1 , ' WB ' , true);
774774
775775 -- Create matches linked to finished brackets
776776 -- SF1: T1 vs T4 → T1 wins, SF2: T2 vs T3 → T2 wins, Final: T1 vs T2 → T1 wins
@@ -980,23 +980,23 @@ BEGIN
980980 END LOOP;
981981
982982 -- First round brackets (3 matches for 6 teams)
983- INSERT INTO tournament_brackets (id, tournament_stage_id, tournament_team_id_1, tournament_team_id_2, round, match_number, finished)
983+ INSERT INTO tournament_brackets (id, tournament_stage_id, tournament_team_id_1, tournament_team_id_2, round, match_number, " group " , path , finished)
984984 VALUES
985- (t2_bracket_r1m1, t2_stage_id, t2_team_ids[1 ], t2_team_ids[6 ], 1 , 1 , true);
986- INSERT INTO tournament_brackets (id, tournament_stage_id, tournament_team_id_1, tournament_team_id_2, round, match_number, finished)
985+ (t2_bracket_r1m1, t2_stage_id, t2_team_ids[1 ], t2_team_ids[6 ], 1 , 1 , 1 , ' WB ' , true);
986+ INSERT INTO tournament_brackets (id, tournament_stage_id, tournament_team_id_1, tournament_team_id_2, round, match_number, " group " , path , finished)
987987 VALUES
988- (t2_bracket_r1m2, t2_stage_id, t2_team_ids[2 ], t2_team_ids[5 ], 1 , 2 , false),
989- (t2_bracket_r1m3, t2_stage_id, t2_team_ids[3 ], t2_team_ids[4 ], 1 , 3 , false);
988+ (t2_bracket_r1m2, t2_stage_id, t2_team_ids[2 ], t2_team_ids[5 ], 1 , 2 , 1 , ' WB ' , false),
989+ (t2_bracket_r1m3, t2_stage_id, t2_team_ids[3 ], t2_team_ids[4 ], 1 , 3 , 1 , ' WB ' , false);
990990
991991 -- Semifinal brackets (placeholders)
992- INSERT INTO tournament_brackets (tournament_stage_id, tournament_team_id_1, round, match_number, finished)
992+ INSERT INTO tournament_brackets (tournament_stage_id, tournament_team_id_1, round, match_number, " group " , path , finished)
993993 VALUES
994- (t2_stage_id, t2_team_ids[1 ], 2 , 1 , false),
995- (t2_stage_id, NULL , 2 , 2 , false);
994+ (t2_stage_id, t2_team_ids[1 ], 2 , 1 , 1 , ' WB ' , false),
995+ (t2_stage_id, NULL , 2 , 2 , 1 , ' WB ' , false);
996996
997997 -- Final bracket
998- INSERT INTO tournament_brackets (tournament_stage_id, round, match_number, finished)
999- VALUES (t2_stage_id, 3 , 1 , false);
998+ INSERT INTO tournament_brackets (tournament_stage_id, round, match_number, " group " , path , finished)
999+ VALUES (t2_stage_id, 3 , 1 , 1 , ' WB ' , false);
10001000
10011001 -- Create match for the one finished bracket (R1 M1: T1 vs T6, T1 wins)
10021002 DECLARE
0 commit comments