change foreign keys for salaries

This commit is contained in:
Nick Griffey 2024-01-27 22:41:40 -06:00
parent 6bc8d4e9e9
commit f2f6f04a39
1 changed files with 2 additions and 1 deletions

View File

@ -163,7 +163,8 @@ CREATE TABLE IF NOT EXISTS "salaries" (
"player" TEXT,
"salary" NUMERIC,
PRIMARY KEY("year","player","team"),
foreign key("year","player","team") references "appearances"("year","player","team")
foreign key("player") references "people"("ID"),
foreign key("year","team") references "teamseasons"("year","team")
);
insert into salaries select distinct * from "transformed"."salaries";