From a4767f36d44ee05445b7c1960f725f7561fe3943 Mon Sep 17 00:00:00 2001 From: Nick Griffey Date: Tue, 30 Jan 2024 20:30:31 -0600 Subject: [PATCH] change keys --- sql/load.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/load.sql b/sql/load.sql index 8376dc2..7ce8798 100644 --- a/sql/load.sql +++ b/sql/load.sql @@ -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;