change keys

This commit is contained in:
Nick Griffey 2024-01-30 20:30:31 -06:00
parent 4f8694bfb9
commit a4767f36d4
1 changed files with 4 additions and 2 deletions

View File

@ -608,9 +608,11 @@ CREATE TABLE "allstarstartingpos" (
"player" NUMERIC,
"year" NUMERIC,
"gameNum" NUMERIC,
"league" NUMERIC,
"startingPos" NUMERIC,
primary key("player","year","gameNum","startingPos"),
foreign key("player","year","gameNum") references "allstars"("player","year","gameNum")
primary key("year","gameNum","league","startingPos"),
foreign key("player","year","gameNum") references "allstars"("player","year","gameNum"),
foreign key("league") references "leagues"("ID")
);
insert into allstarstartingpos select distinct * from "transformed".allstarstartingpos;