2024-01-26 01:28:46 +00:00
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS "pk_awardsmanagers" (
|
|
|
|
"playerID" TEXT,
|
|
|
|
"awardID" TEXT,
|
|
|
|
"yearID" NUMERIC,
|
|
|
|
"lgID" TEXT,
|
|
|
|
"tie" TEXT,
|
|
|
|
"notes" TEXT,
|
2024-01-26 01:49:08 +00:00
|
|
|
PRIMARY KEY("awardID","yearID","lgID","playerID"),
|
|
|
|
foreign key("playerID") references "people"("playerID")
|
2024-01-26 01:28:46 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO "pk_awardsmanagers" SELECT DISTINCT * FROM "awardsmanagers";
|
|
|
|
DROP TABLE "awardsmanagers";
|
|
|
|
ALTER TABLE "pk_awardsmanagers" RENAME TO "awardsmanagers";
|
|
|
|
COMMIT;
|