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"),
	foreign key("teamIDwinner") references "teams"("teamID"),
	foreign key("teamIDloser") references "teams"("teamID")
);

INSERT INTO "pk_seriespost" SELECT DISTINCT * FROM "seriespost";
DROP TABLE "seriespost";
ALTER TABLE "pk_seriespost" RENAME TO "seriespost";
COMMIT;
