use appearancespost as foreign key
This commit is contained in:
parent
c22af98eb9
commit
2a18e2e8f4
|
@ -405,7 +405,7 @@ CREATE TABLE IF NOT EXISTS "battingpost" (
|
||||||
"SF" NUMERIC,
|
"SF" NUMERIC,
|
||||||
"GIDP" NUMERIC,
|
"GIDP" NUMERIC,
|
||||||
PRIMARY KEY("year","player","round"),
|
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")
|
foreign key("year","round") references "seriespost"("year","round")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ CREATE TABLE IF NOT EXISTS "fieldingpost" (
|
||||||
"SB" NUMERIC,
|
"SB" NUMERIC,
|
||||||
"CS" NUMERIC,
|
"CS" NUMERIC,
|
||||||
PRIMARY KEY("player","year","round","POS"),
|
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")
|
foreign key("year","round") references "seriespost"("year","round")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ CREATE TABLE IF NOT EXISTS "pitchingpost" (
|
||||||
"SF" NUMERIC,
|
"SF" NUMERIC,
|
||||||
"GIDP" NUMERIC,
|
"GIDP" NUMERIC,
|
||||||
PRIMARY KEY("player","year","round"),
|
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")
|
foreign key("year","round") references "seriespost"("year","round")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue