2024-01-26 01:28:46 +00:00
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS "pk_managers" (
|
|
|
|
"playerID" TEXT,
|
|
|
|
"yearID" NUMERIC,
|
|
|
|
"teamID" TEXT,
|
|
|
|
"lgID" TEXT,
|
|
|
|
"inseason" NUMERIC,
|
|
|
|
"G" NUMERIC,
|
|
|
|
"W" NUMERIC,
|
|
|
|
"L" NUMERIC,
|
|
|
|
"rank" NUMERIC,
|
|
|
|
"plyrMgr" TEXT,
|
2024-01-26 01:49:08 +00:00
|
|
|
PRIMARY KEY("playerID","yearID","teamID","inseason"),
|
2024-01-26 01:59:14 +00:00
|
|
|
foreign key("playerID") references "people"("playerID")
|
2024-01-26 01:28:46 +00:00
|
|
|
);
|
|
|
|
INSERT INTO "pk_managers" SELECT DISTINCT * FROM "managers";
|
|
|
|
DROP TABLE "managers";
|
|
|
|
ALTER TABLE "pk_managers" RENAME TO "managers";
|
|
|
|
COMMIT;
|