begin restucturing build
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
BEGIN;
|
||||
CREATE TABLE "pk_people" (
|
||||
"playerID" NUMERIC,
|
||||
"birthYear" NUMERIC,
|
||||
"birthMonth" NUMERIC,
|
||||
"birthDay" NUMERIC,
|
||||
"birthCountry" NUMERIC,
|
||||
"birthState" NUMERIC,
|
||||
"birthCity" NUMERIC,
|
||||
"deathYear" NUMERIC,
|
||||
"deathMonth" NUMERIC,
|
||||
"deathDay" NUMERIC,
|
||||
"deathCountry" NUMERIC,
|
||||
"deathState" NUMERIC,
|
||||
"deathCity" NUMERIC,
|
||||
"nameFirst" NUMERIC,
|
||||
"nameLast" NUMERIC,
|
||||
"nameGiven" NUMERIC,
|
||||
"weight" NUMERIC,
|
||||
"height" NUMERIC,
|
||||
"bats" NUMERIC,
|
||||
"throws" NUMERIC,
|
||||
"debut" NUMERIC,
|
||||
"finalGame" NUMERIC,
|
||||
"retroID" NUMERIC,
|
||||
"bbrefID" NUMERIC,
|
||||
primary key("playerID")
|
||||
);
|
||||
|
||||
INSERT INTO "pk_people" SELECT DISTINCT * FROM "people";
|
||||
DROP TABLE "people";
|
||||
ALTER TABLE "pk_people" RENAME TO "people";
|
||||
COMMIT;
|
||||
32
sql/people.sql
Normal file
32
sql/people.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
BEGIN;
|
||||
attach database 'baseball-raw.db' as 'raw';
|
||||
CREATE TABLE "people" (
|
||||
"playerID" text,
|
||||
"birthYear" NUMERIC,
|
||||
"birthMonth" NUMERIC,
|
||||
"birthDay" NUMERIC,
|
||||
"birthCountry" text,
|
||||
"birthState" text,
|
||||
"birthCity" text,
|
||||
"deathYear" text,
|
||||
"deathMonth" text,
|
||||
"deathDay" text,
|
||||
"deathCountry" text,
|
||||
"deathState" text,
|
||||
"deathCity" text,
|
||||
"nameFirst" text,
|
||||
"nameLast" text,
|
||||
"nameGiven" text,
|
||||
"weight" NUMERIC,
|
||||
"height" NUMERIC,
|
||||
"bats" text,
|
||||
"throws" text,
|
||||
"debut" text,
|
||||
"finalGame" text,
|
||||
"retroID" text,
|
||||
"bbrefID" text,
|
||||
primary key("playerID")
|
||||
);
|
||||
|
||||
INSERT INTO "people" SELECT DISTINCT * FROM "raw"."people";
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user