2024-01-26 00:48:11 +00:00
|
|
|
begin;
|
|
|
|
CREATE TABLE IF NOT EXISTS "pk_awardsshareplayers" (
|
|
|
|
"awardID" TEXT,
|
|
|
|
"yearID" NUMERIC,
|
|
|
|
"lgID" TEXT,
|
|
|
|
"playerID" TEXT,
|
|
|
|
"pointsWon" NUMERIC,
|
|
|
|
"pointsMax" NUMERIC,
|
|
|
|
"votesFirst" NUMERIC,
|
2024-01-26 01:49:08 +00:00
|
|
|
PRIMARY KEY("awardID","yearID","playerID","lgID"),
|
|
|
|
foreign key("playerID") references "people"("playerID")
|
2024-01-26 00:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO "pk_awardsshareplayers" SELECT DISTINCT * FROM "awardsshareplayers";
|
|
|
|
DROP TABLE "awardsshareplayers";
|
|
|
|
ALTER TABLE "pk_awardsshareplayers" RENAME TO "awardsshareplayers";
|
|
|
|
commit;
|