lahmanlite/sql/keys/seriespost.sql

19 lines
409 B
MySQL
Raw Normal View History

2024-01-26 00:48:11 +00:00
BEGIN;
CREATE TABLE IF NOT EXISTS "pk_seriespost" (
"yearID" NUMERIC,
"round" NUMERIC,
"teamIDwinner" TEXT,
"lgIDwinner" TEXT,
"teamIDloser" TEXT,
"lgIDloser" TEXT,
"wins" NUMERIC,
"losses" NUMERIC,
"ties" NUMERIC,
PRIMARY KEY("yearID","round")
2024-01-26 00:48:11 +00:00
);
INSERT INTO "pk_seriespost" SELECT DISTINCT * FROM "seriespost";
DROP TABLE "seriespost";
ALTER TABLE "pk_seriespost" RENAME TO "seriespost";
COMMIT;