2024-01-26 00:48:11 +00:00
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS "pk_salaries" (
|
|
|
|
"yearID" NUMERIC,
|
|
|
|
"teamID" TEXT,
|
|
|
|
"lgID" TEXT,
|
|
|
|
"playerID" TEXT,
|
|
|
|
"salary" NUMERIC,
|
2024-01-26 01:49:08 +00:00
|
|
|
PRIMARY KEY("yearID","playerID","teamID"),
|
2024-01-26 01:59:14 +00:00
|
|
|
foreign key("playerID") references "people"("playerID")
|
2024-01-26 00:48:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
INSERT INTO "pk_salaries" SELECT DISTINCT * FROM "salaries";
|
|
|
|
DROP TABLE "salaries";
|
|
|
|
ALTER TABLE "pk_salaries" RENAME TO "salaries";
|
|
|
|
COMMIT;
|