remove old keys files
This commit is contained in:
parent
2e6e98c41c
commit
3a291533a8
|
@ -1,14 +0,0 @@
|
|||
BEGIN;
|
||||
CREATE TABLE IF NOT EXISTS "pk_collegeplaying" (
|
||||
"playerID" TEXT,
|
||||
"schoolID" TEXT,
|
||||
"yearID" NUMERIC,
|
||||
PRIMARY KEY("playerID","yearID","schoolID"),
|
||||
foreign key("playerID") references "people"("playerID"),
|
||||
foreign key("schoolID") references "schools"("schoolID")
|
||||
);
|
||||
|
||||
INSERT INTO "pk_collegeplaying" SELECT DISTINCT * FROM "collegeplaying";
|
||||
DROP TABLE "collegeplaying";
|
||||
ALTER TABLE "pk_collegeplaying" RENAME TO "collegeplaying";
|
||||
COMMIT;
|
|
@ -1,15 +0,0 @@
|
|||
BEGIN;
|
||||
CREATE TABLE IF NOT EXISTS "pk_parks" (
|
||||
"park.key" TEXT,
|
||||
"park.name" TEXT,
|
||||
"park.alias" TEXT,
|
||||
"city" TEXT,
|
||||
"state" TEXT,
|
||||
"country" TEXT,
|
||||
PRIMARY KEY("park.key")
|
||||
);
|
||||
|
||||
INSERT INTO "pk_parks" SELECT DISTINCT * FROM "parks";
|
||||
DROP TABLE "parks";
|
||||
ALTER TABLE "pk_parks" RENAME TO "parks";
|
||||
COMMIT;
|
|
@ -1,14 +0,0 @@
|
|||
BEGIN;
|
||||
CREATE TABLE IF NOT EXISTS "pk_schools" (
|
||||
"schoolID" TEXT,
|
||||
"name_full" TEXT,
|
||||
"city" TEXT,
|
||||
"state" TEXT,
|
||||
"country" TEXT,
|
||||
PRIMARY KEY("schoolID")
|
||||
);
|
||||
|
||||
INSERT INTO "pk_schools" SELECT DISTINCT * FROM "schools";
|
||||
DROP TABLE "schools";
|
||||
ALTER TABLE "pk_schools" RENAME TO "schools";
|
||||
COMMIT;
|
|
@ -1,58 +0,0 @@
|
|||
BEGIN;
|
||||
CREATE TABLE IF NOT EXISTS "pk_teams" (
|
||||
"yearID" NUMERIC,
|
||||
"lgID" TEXT,
|
||||
"teamID" TEXT,
|
||||
"franchID" TEXT,
|
||||
"divID" TEXT,
|
||||
"Rank" NUMERIC,
|
||||
"G" NUMERIC,
|
||||
"Ghome" NUMERIC,
|
||||
"W" NUMERIC,
|
||||
"L" NUMERIC,
|
||||
"DivWin" NUMERIC,
|
||||
"WCWin" NUMERIC,
|
||||
"LgWin" NUMERIC,
|
||||
"WSWin" NUMERIC,
|
||||
"R" NUMERIC,
|
||||
"AB" NUMERIC,
|
||||
"H" NUMERIC,
|
||||
"2B" NUMERIC,
|
||||
"3B" NUMERIC,
|
||||
"HR" NUMERIC,
|
||||
"BB" NUMERIC,
|
||||
"SO" NUMERIC,
|
||||
"SB" NUMERIC,
|
||||
"CS" NUMERIC,
|
||||
"HBP" NUMERIC,
|
||||
"SF" NUMERIC,
|
||||
"RA" NUMERIC,
|
||||
"ER" NUMERIC,
|
||||
"ERA" NUMERIC,
|
||||
"CG" NUMERIC,
|
||||
"SHO" NUMERIC,
|
||||
"SV" NUMERIC,
|
||||
"IPouts" NUMERIC,
|
||||
"HA" NUMERIC,
|
||||
"HRA" NUMERIC,
|
||||
"BBA" NUMERIC,
|
||||
"SOA" NUMERIC,
|
||||
"E" NUMERIC,
|
||||
"DP" NUMERIC,
|
||||
"FP" NUMERIC,
|
||||
"name" NUMERIC,
|
||||
"park" NUMERIC,
|
||||
"attendance" NUMERIC,
|
||||
"BPF" NUMERIC,
|
||||
"PPF" NUMERIC,
|
||||
"teamIDBR" TEXT,
|
||||
"teamIDlahman45" TEXT,
|
||||
"teamIDretro" TEXT,
|
||||
PRIMARY KEY("yearID","franchID"),
|
||||
foreign key("franchID") references "teamsfranchises"("franchID")
|
||||
);
|
||||
|
||||
INSERT INTO "pk_teams" SELECT DISTINCT * FROM "teams";
|
||||
DROP TABLE "teams";
|
||||
ALTER TABLE "pk_teams" RENAME TO "teams";
|
||||
COMMIT;
|
Loading…
Reference in New Issue