2024-01-26 00:48:11 +00:00
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS "pk_halloffame" (
|
|
|
|
"playerID" TEXT,
|
|
|
|
"yearID" NUMERIC,
|
|
|
|
"votedBy" TEXT,
|
|
|
|
"ballots" NUMERIC,
|
|
|
|
"needed" NUMERIC,
|
|
|
|
"votes" NUMERIC,
|
|
|
|
"inducted" TEXT,
|
|
|
|
"category" TEXT,
|
|
|
|
"needed_note" TEXT,
|
|
|
|
PRIMARY KEY("playerID","yearID","votedBy")
|
2024-01-26 01:49:08 +00:00
|
|
|
foreign key("playerID") references "people"("playerID")
|
2024-01-26 00:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO "pk_halloffame" SELECT DISTINCT * FROM "halloffame";
|
|
|
|
DROP TABLE "halloffame";
|
|
|
|
ALTER TABLE "pk_halloffame" RENAME TO "halloffame";
|
|
|
|
COMMIT;
|