Add table for park aliases

This commit is contained in:
Nick Griffey 2024-01-25 21:43:23 -06:00
parent 8d588eb8ba
commit a277bd1692
2 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,7 @@ bbdb = baseballdatabank-2023.1
db: baseball.db
baseball.db: sql/corrections/*.sql sql/keys/*.sql
baseball.db: sql/corrections/*.sql sql/keys/*.sql sql/1nf/*.sql
rm -f baseball.db
sqlite3 baseball.db ".import --csv $(bbdb)/core/AllstarFull.csv allstarfull"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Appearances.csv appearances"
@ -35,4 +35,5 @@ baseball.db: sql/corrections/*.sql sql/keys/*.sql
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/Schools.csv schools"
cat sql/corrections/*.sql | sqlite3 baseball.db
cat sql/keys/*.sql | sqlite3 baseball.db
cat sql/1nf/*.sql | sqlite3 baseball.db
sqlite3 baseball.db "VACUUM"

7
sql/1nf/parkaliases.sql Normal file
View File

@ -0,0 +1,7 @@
begin;
create table if not exists "parkaliases" (
"parkID" text,
"alias" text,
primary key("parkID","alias")
);
commit;