use appearancespost as foreign key

This commit is contained in:
Nick Griffey 2024-01-29 22:11:19 -06:00
parent c22af98eb9
commit 2a18e2e8f4
1 changed files with 3 additions and 3 deletions

View File

@ -405,7 +405,7 @@ CREATE TABLE IF NOT EXISTS "battingpost" (
"SF" NUMERIC,
"GIDP" NUMERIC,
PRIMARY KEY("year","player","round"),
foreign key("player") references "people"("ID"),
foreign key("player","year") references "appearancespost"("player","year"),
foreign key("year","round") references "seriespost"("year","round")
);
@ -428,7 +428,7 @@ CREATE TABLE IF NOT EXISTS "fieldingpost" (
"SB" NUMERIC,
"CS" NUMERIC,
PRIMARY KEY("player","year","round","POS"),
foreign key("player") references "people"("ID"),
foreign key("player","year") references "appearancespost"("player","year"),
foreign key("year","round") references "seriespost"("year","round")
);
@ -464,7 +464,7 @@ CREATE TABLE IF NOT EXISTS "pitchingpost" (
"SF" NUMERIC,
"GIDP" NUMERIC,
PRIMARY KEY("player","year","round"),
foreign key("player") references "people"("ID"),
foreign key("player","year") references "appearancespost"("player","year"),
foreign key("year","round") references "seriespost"("year","round")
);