From b8c395c4c61191f967c1a89160d9cc81d77e6262 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Mon, 25 Apr 2022 14:16:58 +0200 Subject: [PATCH] Fix initdb.sql --- src/server/management/initDB.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/server/management/initDB.sql b/src/server/management/initDB.sql index d2b4ff6..53e7166 100644 --- a/src/server/management/initDB.sql +++ b/src/server/management/initDB.sql @@ -50,6 +50,7 @@ CREATE TABLE users ( -- Example data (Two tournaments, 4 teams, single elimination) INSERT INTO tournaments (name, description, prize, startTime, endTime, teamLimit) VALUES ('Tournament 1', 'First tournament, single elimination', '300 000 points', '2022-04-29 16:00:00', '2022-04-29 20:00:00', 4); INSERT INTO tournaments (name, description, prize, startTime, endTime, teamLimit) VALUES ('Tournament 2', 'Second tournament, four teams', '450 000 points', '2022-04-29 09:00:00', '2022-04-29 10:30:00', 8); +INSERT INTO tournaments (name, description, prize, startTime, endTime, teamLimit) VALUES ('Tournament 3', 'Previous tournament, it is done', '200 000 points', '2022-04-24 12:00:00', '2022-04-25 12:00:00', 4); INSERT INTO teams (tournamentId, name) VALUES (1, 'Fnatic'); -- 1 INSERT INTO teams (tournamentId, name) VALUES (1, 'Cloud 9'); -- 2 @@ -65,6 +66,12 @@ INSERT INTO teams (tournamentId, name) VALUES (2, 'Virtus.pro'); -- 10 INSERT INTO teams (tournamentId, name) VALUES (2, 'Natus Vincere'); -- 11 INSERT INTO teams (tournamentId, name) VALUES (2, 'FaZe'); -- 12 +INSERT INTO teams(tournamentId, name) VALUES (3, 'Fnatic'); -- 13 +INSERT INTO teams(tournamentId, name) VALUES (3, 'Cloud 9'); -- 14 +INSERT INTO teams(tournamentId, name) VALUES (3, 'Team Liquid'); -- 15 +INSERT INTO teams(tournamentId, name) VALUES (3, 'LDLC'); -- 16 + + -- tournament 1 -- -- Final match INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier) VALUES (1, NULL, NULL, NULL, 0); -- 1 @@ -84,6 +91,14 @@ INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier) VALUES INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier) VALUES (2, 6, 9, 10, 2); -- 9 INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier) VALUES (2, 6, 11, 12, 2); -- 10 +-- tournament 3 -- +-- Final match +INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier, winnerId) VALUES (3, NULL, 14, 15, 0, 14); -- 11 +-- Semi-finals +INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier, winnerId) VALUES (3, 11, 13, 14, 1, 14); -- 12 +INSERT INTO matches (tournamentId, parentMatchId, team1Id, team2Id, tier, winnerId) VALUES (3, 11, 15, 16, 1, 15); -- 13 + +-- Users INSERT INTO users (email, isManager) VALUES ('felixalbrigtsen@gmail.com', 1); INSERT INTO users (email, isManager) VALUES ('kriloneri@gmail.com', 1); INSERT INTO users (email, isManager) VALUES ('limboblivion@gmail.com', 1);