Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
cd98947
Implement scouting navigation in MainNav component
lucasdoell Feb 24, 2026
edb450e
Add scouting-related translations to English JSON file
lucasdoell Feb 24, 2026
0c52ff9
Add scouting tool flag to enable or disable the feature in the applic…
lucasdoell Feb 24, 2026
b0b842d
Integrate scouting feature into MainNav component, conditionally rend…
lucasdoell Feb 24, 2026
347a355
Update PlayerRow component to use playerKey for unique identification…
lucasdoell Feb 24, 2026
3de59af
Refactor PlayerPerformanceHoverChart and PlayerRow components to enha…
lucasdoell Feb 24, 2026
06f3a69
Test new bug fixing approach
lucasdoell Feb 24, 2026
7f66708
Refactor PlayerPerformanceHoverChart and ScrimOverviewCard components…
lucasdoell Feb 24, 2026
f1b8e03
Reformat
lucasdoell Feb 24, 2026
27668d2
Update MainNav component to conditionally render scouting links based…
lucasdoell Feb 24, 2026
357ceff
Add scouting models to Prisma schema and create corresponding migrati…
lucasdoell Feb 25, 2026
b284953
Add script to seed scouting data from JSON file into the database, in…
lucasdoell Feb 25, 2026
8b1f7e2
Implement team name cleaning function to remove Liquipedia suffix in …
lucasdoell Feb 25, 2026
7932120
Add TeamSearch component for scouting team search functionality
lucasdoell Feb 25, 2026
5f87b8d
Add getScoutingTeams function and ScoutingTeam type for retrieving an…
lucasdoell Feb 25, 2026
cc30c8b
Add Scouting page layout and functionality, including metadata and te…
lucasdoell Feb 25, 2026
8ba39b1
Add detailed ScoutingTeamProfile type and related data processing fun…
lucasdoell Feb 25, 2026
7ecc74d
Add HeroBanChart component to visualize hero bans data with bar chart…
lucasdoell Feb 25, 2026
bbe380e
Add MapPerformanceChart component to visualize map performance data w…
lucasdoell Feb 25, 2026
d040207
Add MatchHistoryTable component to display and paginate match history…
lucasdoell Feb 25, 2026
d6541f3
Add ScoutingRecommendations component to display team recommendations…
lucasdoell Feb 25, 2026
6700d90
Add TeamOverviewCards component to display team performance metrics, …
lucasdoell Feb 25, 2026
ce07a88
Add team scouting page with detailed metadata, overview, hero bans, m…
lucasdoell Feb 25, 2026
c2cd38d
Add MethodologyCard component to display methodology points with tran…
lucasdoell Feb 25, 2026
63c85bc
Add methodology details to scouting page components for enhanced insi…
lucasdoell Feb 25, 2026
b0e03eb
Update navigation links in MainNav component to correctly reflect sco…
lucasdoell Feb 25, 2026
5285699
Implement scouting feature toggle in ScoutingPage and ScoutingTeamPag…
lucasdoell Feb 25, 2026
097f368
Add matchRoomUrl and vods fields to ScoutingMatch model in schema.pri…
lucasdoell Feb 25, 2026
3980261
Add VodData interface and update MatchData structure to include vods …
lucasdoell Feb 25, 2026
880ff3c
Add team composition fields to ScoutingMapResult model in schema.pris…
lucasdoell Feb 25, 2026
a8a6ce8
Add API route for saving team compositions with validation and error …
lucasdoell Feb 25, 2026
f4e40a7
Add Data Labeling feature with layout and page components, including …
lucasdoell Feb 25, 2026
732be11
Add Match Labeling page component to handle match data labeling
lucasdoell Feb 25, 2026
8ac31d5
Add HeroCompPicker component for team composition selection with role…
lucasdoell Feb 25, 2026
4974ff4
Add MatchLabelingView component to display match details, team compos…
lucasdoell Feb 25, 2026
9e37d56
Add UnlabeledMatchList component to display and paginate unlabeled ma…
lucasdoell Feb 25, 2026
16f93bc
Add data labeling DTOs and functions for fetching unlabeled matches a…
lucasdoell Feb 25, 2026
691506d
Add data labeling flag to enable or disable the data labeling tool in…
lucasdoell Feb 25, 2026
47041ee
Add API route for fetching unlabeled matches with pagination, user au…
lucasdoell Feb 25, 2026
fdb4f23
Remove unused API call for fetching unlabeled matches from DataLabeli…
lucasdoell Feb 25, 2026
9837ca0
Refactor UnlabeledMatchList to fetch unlabeled matches using React Qu…
lucasdoell Feb 25, 2026
f22b481
Add title for unlabeled matches in English localization
lucasdoell Feb 25, 2026
bf85fd4
Add ScoutingRoster and ScoutingHeroAssignment models, along with asso…
lucasdoell Feb 25, 2026
d58eb1c
Add functionality to seed rosters and participants in scouting data
lucasdoell Feb 25, 2026
2f2a005
Add hero assignment management to the save competition API
lucasdoell Feb 25, 2026
7fde4d9
Add player assignment messages to English localization
lucasdoell Feb 25, 2026
5bc7190
Add PlayerAssignmentPanel component for managing player assignments t…
lucasdoell Feb 25, 2026
3be15a4
Add utility functions for managing hero-role assignments in roster la…
lucasdoell Feb 25, 2026
8c37089
Enhance HeroCompPicker to display assigned players for each hero slot
lucasdoell Feb 25, 2026
663ef32
Add player assignment management to MatchLabelingView, integrating Pl…
lucasdoell Feb 25, 2026
e80f4de
Add roster player and hero assignment types for match labeling, and i…
lucasdoell Feb 25, 2026
f2e372b
Add reset functionality to MatchLabelingView, including a reset butto…
lucasdoell Feb 25, 2026
85bb906
Fix reconciliation issue with vod panel re-rendering on state change
lucasdoell Feb 25, 2026
0232491
Add scoutingTeamAbbr column to Team model and corresponding migration
lucasdoell Feb 25, 2026
06efb25
Add optional scoutingTeamAbbr field to TeamNameUpdateSchema in update…
lucasdoell Feb 25, 2026
395e34d
Refactor ConfidenceBadge component to utilize assessConfidence for le…
lucasdoell Feb 25, 2026
4ba72d3
Add scouting functionality to TeamSettingsForm, integrating scoutingT…
lucasdoell Feb 25, 2026
70edd91
Add team strength rating calculations and retrieval functions, includ…
lucasdoell Feb 25, 2026
1eee6c4
Add confidence assessment functionality with new types and methods, i…
lucasdoell Feb 25, 2026
c5e8b04
Add scouting link functionality to team settings, allowing teams to c…
lucasdoell Feb 25, 2026
93a0723
Add Hero Ban Intelligence DTO with comprehensive data structures and …
lucasdoell Feb 25, 2026
6c24149
Add Map Intelligence DTO with data structures and functions for analy…
lucasdoell Feb 25, 2026
612b0a6
Add Player Intelligence DTO with data structures and functions for an…
lucasdoell Feb 25, 2026
9b29d46
Add Insight Generation Module with data structures and functions for …
lucasdoell Feb 25, 2026
98c7525
Add opponentTeamAbbr field to Scrim model and update migration for da…
lucasdoell Feb 25, 2026
f51a2da
Add opponentTeamAbbr to scrim creation function to support new data s…
lucasdoell Feb 25, 2026
5625eef
Add opponentTeamAbbr field to update scrim options to enhance data ha…
lucasdoell Feb 25, 2026
f7f276f
Add scouting team selection feature in EditScrimForm to enhance oppon…
lucasdoell Feb 25, 2026
7fb238d
Refactor EditScrimPage to include scouting teams and enable scouting …
lucasdoell Feb 25, 2026
adf93a4
Add opponent selection feature in ScrimCreationForm to link scouting …
lucasdoell Feb 25, 2026
72dea68
Add GET endpoint for retrieving scouting teams, ensuring authenticati…
lucasdoell Feb 25, 2026
baedd68
Enhance getHeroBanIntelligenceFn to include optional DataAvailability…
lucasdoell Feb 25, 2026
e473051
Add optional DataAvailabilityProfile parameter to getMapIntelligenceF…
lucasdoell Feb 25, 2026
468fd4d
Add optional DataAvailabilityProfile parameter to getPlayerIntelligen…
lucasdoell Feb 25, 2026
9e57d8d
Add Data Availability types and utility functions for scrim data inte…
lucasdoell Feb 25, 2026
c92cdc1
Enhance insights module by adding dataSource field to Insight type an…
lucasdoell Feb 25, 2026
f0ffbe3
Update CreateScrimButton to enhance dialog content styling with respo…
lucasdoell Feb 25, 2026
c6f9352
Refactor ScrimCreationForm to improve layout and add team and date se…
lucasdoell Feb 25, 2026
5e1e55e
Add OpponentSearchField component for enhanced team selection with se…
lucasdoell Feb 25, 2026
4bf98ca
Refactor scrim forms to utilize OpponentSearchField for improved oppo…
lucasdoell Feb 25, 2026
0690447
Add opponent team information display in ScrimDashboardPage, enhancin…
lucasdoell Feb 25, 2026
cf3dd40
Enhance getHeroBanIntelligenceFn to integrate scrim data by checking …
lucasdoell Feb 25, 2026
7c312c2
Refactor map intelligence calculations to incorporate scrim data, enh…
lucasdoell Feb 25, 2026
89e1050
Integrate scrim data into getPlayerIntelligenceFn by checking DataAva…
lucasdoell Feb 25, 2026
c7cbc32
Add scrim opponent DTO to facilitate comprehensive scrim data analyti…
lucasdoell Feb 25, 2026
4372bbb
Implement resolveDataAvailability function to determine available dat…
lucasdoell Feb 25, 2026
f4a84ba
Enhance insights generation by integrating DataAvailabilityProfile
lucasdoell Feb 25, 2026
d90daad
Add report section to insights with methodology details, including pl…
lucasdoell Feb 25, 2026
475bf52
Add BanStrategy component to display hero ban insights, including dis…
lucasdoell Feb 25, 2026
87d73e9
Add ConfidenceIndicator and ConfidenceDot components for visual repre…
lucasdoell Feb 25, 2026
5243371
Add InsightCard component to display insights with confidence levels,…
lucasdoell Feb 25, 2026
83519f5
Add MapVetoAdvisor component to provide map selection and ban recomme…
lucasdoell Feb 25, 2026
af4e32b
Add PlayerMatchups component to analyze player vulnerabilities and he…
lucasdoell Feb 25, 2026
66b1087
Add ScoutForTeamPicker component to allow users to select a team for …
lucasdoell Feb 25, 2026
13beacd
Add ScoutingReport component to display pre-match insights, including…
lucasdoell Feb 25, 2026
5e78ae2
Add TeamOverviewEnhanced component to provide a detailed overview of …
lucasdoell Feb 25, 2026
6c5b533
Enhance ScoutingTeamPage with user team selection and detailed insigh…
lucasdoell Feb 25, 2026
a746cc4
Refactor computeIntraTeamZScores to aggregate player statistics by ro…
lucasdoell Feb 25, 2026
c413488
Enhance player insights methodology in scouting reports, adding detai…
lucasdoell Feb 25, 2026
b853230
Update player matchups and scouting insights, renaming "Players" to "…
lucasdoell Feb 25, 2026
ac357dc
Reformat
lucasdoell Feb 25, 2026
f3fb721
Update resolveDataAvailability function to include user scrim map cou…
lucasdoell Feb 25, 2026
f1db705
Rename fetchTaggedScrimData function to fetchTaggedScrimDataFn and in…
lucasdoell Feb 25, 2026
7c576d3
Introduce getOpponentMatchData function to fetch opponent match detai…
lucasdoell Feb 25, 2026
e183b44
Refactor computeSubstitutionRates to optimize player map and hero dat…
lucasdoell Feb 25, 2026
162009b
Refactor getOpponentMapResults to utilize getOpponentMatchData for im…
lucasdoell Feb 25, 2026
8b645f7
Refactor getOpponentMapBanData to use getOpponentMatchData for stream…
lucasdoell Feb 25, 2026
ae9fffe
Optimize winsAbove1500 calculation in TeamOverviewEnhanced component …
lucasdoell Feb 25, 2026
106e18b
Optimize PlayerMatchups component by utilizing useMemo for role group…
lucasdoell Feb 25, 2026
f9830c0
Refactor MapVetoAdvisor component to utilize useMemo for optimized ma…
lucasdoell Feb 25, 2026
0c1929a
Refactor HeroBanChart component to streamline bansByData mapping for …
lucasdoell Feb 25, 2026
5969796
Add opponentTeamAbbr to scrim data in GET request response for enhanc…
lucasdoell Feb 25, 2026
618f375
Add view scouting report feature to scrim card and update translation…
lucasdoell Feb 25, 2026
6ceb001
Remove unused import
lucasdoell Feb 26, 2026
068a9c9
Update scrim data handling in insights.ts for improved phrasing and c…
lucasdoell Feb 26, 2026
5c2dcf6
Add ScoutingPlayer model to schema and corresponding migration for da…
lucasdoell Feb 27, 2026
272099c
Add script to seed scouting players from JSON data into the database
lucasdoell Feb 27, 2026
5127c46
Add player scouting DTO with types and data fetching functions for pl…
lucasdoell Feb 27, 2026
1f635dd
Add PlayerTournamentHistory component to display tournament records w…
lucasdoell Feb 27, 2026
a0485ca
Add PlayerSearch component for player scouting with search functional…
lucasdoell Feb 27, 2026
dffd1ed
Add PlayerProfileHeader component to display player details, includin…
lucasdoell Feb 27, 2026
b4c554d
Add PlayerHeroPool component to display player's signature heroes and…
lucasdoell Feb 27, 2026
93d2b2a
Add ScoutingPlayerPage component to integrate PlayerProfileHeader, Pl…
lucasdoell Feb 27, 2026
67ef4f1
Add ScoutPlayerPage component to handle player scouting functionality…
lucasdoell Feb 27, 2026
e82a085
Add layout and loading components for ScoutingPlayer, including metad…
lucasdoell Feb 27, 2026
36ba3a1
Add player scouting localization and metadata for Scout Player featur…
lucasdoell Feb 27, 2026
d34867e
Add player scouting analytics DTO with detailed types for hero perfor…
lucasdoell Feb 27, 2026
d59dfe5
Add PlayerStrengthsWeaknesses component to display player strengths a…
lucasdoell Feb 27, 2026
389166c
Add PlayerScrimOverview component to present detailed scrim analytics…
lucasdoell Feb 27, 2026
134926e
Add PlayerPerformanceRadar component to visualize player performance …
lucasdoell Feb 27, 2026
bc42c2a
Add PlayerMapWinrates component to visualize competitive map win rate…
lucasdoell Feb 27, 2026
50fcbb8
Add PlayerKillAnalysis component to visualize player kill data, inclu…
lucasdoell Feb 27, 2026
d499dce
Add PlayerHeroZScores component to visualize hero z-scores, including…
lucasdoell Feb 27, 2026
06451a4
Add skeleton loading components for various player scouting sections,…
lucasdoell Feb 27, 2026
879ce4e
Add detailed analytics localization for scrim performance, hero perfo…
lucasdoell Feb 27, 2026
e3737ec
Add CardFooter to PlayerHeroZScores component for methodology display
lucasdoell Feb 27, 2026
99a778b
Add CardFooter to PlayerKillAnalysis component for displaying methodo…
lucasdoell Feb 27, 2026
fd4fc06
Add CardFooter to PlayerMapWinrates component for displaying methodol…
lucasdoell Feb 27, 2026
455e079
Add CardFooter to PlayerPerformanceRadar component for displaying met…
lucasdoell Feb 27, 2026
0afc0d0
Add methodology display to PlayerScrimOverview component for enhanced…
lucasdoell Feb 27, 2026
e457320
Add CardFooter to PlayerStrengthsWeaknesses component for displaying …
lucasdoell Feb 27, 2026
76ee048
Add detailed methodology descriptions for various performance metrics…
lucasdoell Feb 27, 2026
f3287e1
Reformat
lucasdoell Feb 27, 2026
83f622e
Fix type errors in seed scripts
lucasdoell Feb 27, 2026
8ffbb2e
Enable eslint rule for array index keys in loading component
lucasdoell Feb 27, 2026
f450def
Refactor PlayerMatchups component to improve data handling by initial…
lucasdoell Feb 27, 2026
e0b4b39
Enhance TeamOverview component by reorganizing imports and updating t…
lucasdoell Feb 27, 2026
2ef400c
Refactor prismaClientSingleton function to simplify database client i…
lucasdoell Feb 27, 2026
d9549fc
Add mock implementation for PrismaClient to facilitate testing with v…
lucasdoell Feb 27, 2026
f631e0c
Refactor test files to use mocked PrismaClient for improved testing c…
lucasdoell Feb 27, 2026
67cf77b
Remove obsolete scrim-dto test file as it is no longer needed for tes…
lucasdoell Feb 27, 2026
9ee206b
Remove TEST_DB_URL from environment variables and type definitions to…
lucasdoell Feb 27, 2026
e2ebed8
Reformat
lucasdoell Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ name: Vitest

on: [push]

env:
TEST_DB_URL: ${{ secrets.TEST_DB_URL }}

jobs:
test:
runs-on: ubuntu-latest
Expand Down
380 changes: 378 additions & 2 deletions messages/en.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@
"team": "팀: ",
"noTeam": "분류되지 않음",
"creator": "생성자: ",
"noCreator": "알 수 없음"
"noCreator": "알 수 없음",
"viewScoutingReport": "OWCS 스카우팅 보고서 보기"
},
"scrimCreationForm": {
"fileSize": {
Expand Down
3 changes: 2 additions & 1 deletion messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@
"team": "团队: ",
"noTeam": "未分类",
"creator": "创建者: ",
"noCreator": "未知"
"noCreator": "未知",
"viewScoutingReport": "查看OWCS侦察报告"
},
"scrimCreationForm": {
"fileSize": {
Expand Down
94 changes: 94 additions & 0 deletions prisma/migrations/20260225024756_add_scouting_models/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
-- CreateTable
CREATE TABLE "public"."ScoutingTournament" (
"id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"sourceUrl" TEXT NOT NULL,
"mapPool" JSONB NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingTournament_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "public"."ScoutingMatch" (
"id" SERIAL NOT NULL,
"tournamentId" INTEGER NOT NULL,
"team1" TEXT NOT NULL,
"team1FullName" TEXT NOT NULL,
"team2" TEXT NOT NULL,
"team2FullName" TEXT NOT NULL,
"team1Score" INTEGER NOT NULL,
"team2Score" INTEGER NOT NULL,
"bestOf" INTEGER NOT NULL,
"winner" TEXT NOT NULL,
"winnerFullName" TEXT NOT NULL,
"matchDate" TIMESTAMP(3) NOT NULL,
"mvp" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingMatch_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "public"."ScoutingMapResult" (
"id" SERIAL NOT NULL,
"matchId" INTEGER NOT NULL,
"gameNumber" INTEGER NOT NULL,
"mapType" "public"."MapType" NOT NULL,
"mapName" TEXT NOT NULL,
"team1Score" TEXT NOT NULL,
"team2Score" TEXT NOT NULL,
"winner" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingMapResult_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "public"."ScoutingHeroBan" (
"id" SERIAL NOT NULL,
"mapResultId" INTEGER NOT NULL,
"team" TEXT NOT NULL,
"hero" TEXT NOT NULL,
"banOrder" INTEGER NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingHeroBan_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "ScoutingTournament_title_key" ON "public"."ScoutingTournament"("title");

-- CreateIndex
CREATE INDEX "ScoutingMatch_tournamentId_idx" ON "public"."ScoutingMatch"("tournamentId");

-- CreateIndex
CREATE INDEX "ScoutingMatch_team1_team2_idx" ON "public"."ScoutingMatch"("team1", "team2");

-- CreateIndex
CREATE UNIQUE INDEX "ScoutingMatch_tournamentId_team1_team2_matchDate_key" ON "public"."ScoutingMatch"("tournamentId", "team1", "team2", "matchDate");

-- CreateIndex
CREATE INDEX "ScoutingMapResult_matchId_idx" ON "public"."ScoutingMapResult"("matchId");

-- CreateIndex
CREATE INDEX "ScoutingMapResult_mapName_idx" ON "public"."ScoutingMapResult"("mapName");

-- CreateIndex
CREATE INDEX "ScoutingHeroBan_mapResultId_idx" ON "public"."ScoutingHeroBan"("mapResultId");

-- CreateIndex
CREATE INDEX "ScoutingHeroBan_hero_idx" ON "public"."ScoutingHeroBan"("hero");

-- AddForeignKey
ALTER TABLE "public"."ScoutingMatch" ADD CONSTRAINT "ScoutingMatch_tournamentId_fkey" FOREIGN KEY ("tournamentId") REFERENCES "public"."ScoutingTournament"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "public"."ScoutingMapResult" ADD CONSTRAINT "ScoutingMapResult_matchId_fkey" FOREIGN KEY ("matchId") REFERENCES "public"."ScoutingMatch"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "public"."ScoutingHeroBan" ADD CONSTRAINT "ScoutingHeroBan_mapResultId_fkey" FOREIGN KEY ("mapResultId") REFERENCES "public"."ScoutingMapResult"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- DropIndex
DROP INDEX "public"."ScoutingMatch_tournamentId_team1_team2_matchDate_key";

-- AlterTable
ALTER TABLE "public"."ScoutingMatch" ALTER COLUMN "team1Score" DROP NOT NULL,
ALTER COLUMN "team2Score" DROP NOT NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "public"."ScoutingMatch" ADD COLUMN "matchRoomUrl" TEXT,
ADD COLUMN "vods" JSONB NOT NULL DEFAULT '[]';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "public"."ScoutingMapResult" ADD COLUMN "team1Comp" TEXT[] DEFAULT ARRAY[]::TEXT[],
ADD COLUMN "team2Comp" TEXT[] DEFAULT ARRAY[]::TEXT[];
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-- CreateEnum
CREATE TYPE "public"."RosterCategory" AS ENUM ('player', 'staff', 'substitute');

-- CreateEnum
CREATE TYPE "public"."RosterRole" AS ENUM ('DPS', 'Tank', 'Support', 'Flex', 'Coach', 'HeadCoach', 'AssistantCoach', 'Manager', 'AssistantManager', 'TeamManager', 'Analyst', 'PerformanceCoach', 'Substitute');

-- CreateTable
CREATE TABLE "public"."ScoutingRoster" (
"id" SERIAL NOT NULL,
"tournamentId" INTEGER NOT NULL,
"teamName" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingRoster_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "public"."ScoutingRosterPlayer" (
"id" SERIAL NOT NULL,
"rosterId" INTEGER NOT NULL,
"name" TEXT NOT NULL,
"displayName" TEXT NOT NULL,
"role" "public"."RosterRole" NOT NULL,
"country" TEXT NOT NULL,
"didNotPlay" BOOLEAN NOT NULL DEFAULT false,
"category" "public"."RosterCategory" NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingRosterPlayer_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE INDEX "ScoutingRoster_tournamentId_idx" ON "public"."ScoutingRoster"("tournamentId");

-- CreateIndex
CREATE INDEX "ScoutingRoster_teamName_idx" ON "public"."ScoutingRoster"("teamName");

-- CreateIndex
CREATE UNIQUE INDEX "ScoutingRoster_tournamentId_teamName_key" ON "public"."ScoutingRoster"("tournamentId", "teamName");

-- CreateIndex
CREATE INDEX "ScoutingRosterPlayer_rosterId_idx" ON "public"."ScoutingRosterPlayer"("rosterId");

-- CreateIndex
CREATE INDEX "ScoutingRosterPlayer_displayName_idx" ON "public"."ScoutingRosterPlayer"("displayName");

-- AddForeignKey
ALTER TABLE "public"."ScoutingRoster" ADD CONSTRAINT "ScoutingRoster_tournamentId_fkey" FOREIGN KEY ("tournamentId") REFERENCES "public"."ScoutingTournament"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "public"."ScoutingRosterPlayer" ADD CONSTRAINT "ScoutingRosterPlayer_rosterId_fkey" FOREIGN KEY ("rosterId") REFERENCES "public"."ScoutingRoster"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- CreateTable
CREATE TABLE "public"."ScoutingHeroAssignment" (
"id" SERIAL NOT NULL,
"mapResultId" INTEGER NOT NULL,
"team" TEXT NOT NULL,
"heroName" TEXT NOT NULL,
"playerName" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingHeroAssignment_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE INDEX "ScoutingHeroAssignment_mapResultId_idx" ON "public"."ScoutingHeroAssignment"("mapResultId");

-- CreateIndex
CREATE INDEX "ScoutingHeroAssignment_playerName_idx" ON "public"."ScoutingHeroAssignment"("playerName");

-- CreateIndex
CREATE UNIQUE INDEX "ScoutingHeroAssignment_mapResultId_team_heroName_key" ON "public"."ScoutingHeroAssignment"("mapResultId", "team", "heroName");

-- AddForeignKey
ALTER TABLE "public"."ScoutingHeroAssignment" ADD CONSTRAINT "ScoutingHeroAssignment_mapResultId_fkey" FOREIGN KEY ("mapResultId") REFERENCES "public"."ScoutingMapResult"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "public"."Team" ADD COLUMN "scoutingTeamAbbr" TEXT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "public"."Scrim" ADD COLUMN "opponentTeamAbbr" TEXT;
29 changes: 29 additions & 0 deletions prisma/migrations/20260227024556_add_scouting_player/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-- CreateTable
CREATE TABLE "public"."ScoutingPlayer" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"team" TEXT NOT NULL,
"status" TEXT NOT NULL,
"role" TEXT NOT NULL,
"country" TEXT NOT NULL,
"signatureHeroes" TEXT[],
"winnings" INTEGER NOT NULL DEFAULT 0,
"region" TEXT NOT NULL,
"playerUrl" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "ScoutingPlayer_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "ScoutingPlayer_playerUrl_key" ON "public"."ScoutingPlayer"("playerUrl");

-- CreateIndex
CREATE INDEX "ScoutingPlayer_name_idx" ON "public"."ScoutingPlayer"("name");

-- CreateIndex
CREATE INDEX "ScoutingPlayer_team_idx" ON "public"."ScoutingPlayer"("team");

-- CreateIndex
CREATE INDEX "ScoutingPlayer_region_idx" ON "public"."ScoutingPlayer"("region");
Loading
Loading