lahmanlite/sql/keys/awardssharemanagers.sql

18 lines
504 B
MySQL
Raw Normal View History

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