2024-01-25 05:44:50 +00:00
|
|
|
.PHONY: db
|
|
|
|
|
2024-05-05 01:58:04 +00:00
|
|
|
bbdb = lahman_1871-2023_csv
|
2024-01-25 05:44:50 +00:00
|
|
|
|
|
|
|
db: baseball.db
|
|
|
|
|
2024-01-31 06:09:39 +00:00
|
|
|
baseball.db: baseball-raw.db sql/awards.sql sql/franchises.sql sql/teamseasons.sql sql/seasons.sql sql/parks.sql sql/collegeplaying.sql sql/schools.sql sql/people.sql sql/salaries.sql sql/batting.sql sql/pitching.sql sql/fielding.sql sql/appearances.sql sql/homegames.sql sql/seriespost.sql sql/fieldingofsplit.sql sql/teams.sql sql/leagues.sql sql/managers.sql sql/awardsmanagers.sql sql/battingpost.sql sql/fieldingpost.sql sql/pitchingpost.sql sql/appearancespost.sql sql/awardsshareplayers.sql sql/yearlyawards.sql sql/halloffame.sql sql/halloffamereqs.sql sql/awardsplayers.sql sql/parkaliases.sql sql/teamseasonshalf.sql sql/managershalf.sql sql/allstarstartingpos.sql sql/allstars.sql sql/allstargames.sql sql/playerstints.sql
|
2024-01-25 05:44:50 +00:00
|
|
|
rm -f baseball.db
|
2024-01-31 06:09:39 +00:00
|
|
|
cat sql/allstargames.sql | sqlite3 baseball.db
|
|
|
|
cat sql/allstars.sql | sqlite3 baseball.db
|
|
|
|
cat sql/allstarstartingpos.sql | sqlite3 baseball.db
|
|
|
|
cat sql/appearancespost.sql | sqlite3 baseball.db
|
|
|
|
cat sql/appearances.sql | sqlite3 baseball.db
|
|
|
|
cat sql/awardsmanagers.sql | sqlite3 baseball.db
|
|
|
|
cat sql/awardsplayers.sql | sqlite3 baseball.db
|
|
|
|
cat sql/awardssharemanagers.sql | sqlite3 baseball.db
|
|
|
|
cat sql/awardsshareplayers.sql | sqlite3 baseball.db
|
|
|
|
cat sql/awards.sql | sqlite3 baseball.db
|
|
|
|
cat sql/battingpost.sql | sqlite3 baseball.db
|
|
|
|
cat sql/batting.sql | sqlite3 baseball.db
|
|
|
|
cat sql/collegeplaying.sql | sqlite3 baseball.db
|
|
|
|
cat sql/fieldingofsplit.sql | sqlite3 baseball.db
|
|
|
|
cat sql/fieldingof.sql | sqlite3 baseball.db
|
|
|
|
cat sql/fieldingpost.sql | sqlite3 baseball.db
|
|
|
|
cat sql/fielding.sql | sqlite3 baseball.db
|
|
|
|
cat sql/franchises.sql | sqlite3 baseball.db
|
|
|
|
cat sql/halloffamereqs.sql | sqlite3 baseball.db
|
|
|
|
cat sql/halloffame.sql | sqlite3 baseball.db
|
|
|
|
cat sql/homegames.sql | sqlite3 baseball.db
|
|
|
|
cat sql/leagues.sql | sqlite3 baseball.db
|
|
|
|
cat sql/managershalf.sql | sqlite3 baseball.db
|
|
|
|
cat sql/managers.sql | sqlite3 baseball.db
|
|
|
|
cat sql/parkaliases.sql | sqlite3 baseball.db
|
|
|
|
cat sql/parks.sql | sqlite3 baseball.db
|
|
|
|
cat sql/people.sql | sqlite3 baseball.db
|
|
|
|
cat sql/pitchingpost.sql | sqlite3 baseball.db
|
|
|
|
cat sql/pitching.sql | sqlite3 baseball.db
|
|
|
|
cat sql/playerstints.sql | sqlite3 baseball.db
|
|
|
|
cat sql/salaries.sql | sqlite3 baseball.db
|
|
|
|
cat sql/schools.sql | sqlite3 baseball.db
|
|
|
|
cat sql/seasons.sql | sqlite3 baseball.db
|
|
|
|
cat sql/seriespost.sql | sqlite3 baseball.db
|
|
|
|
cat sql/teamseasonshalf.sql | sqlite3 baseball.db
|
|
|
|
cat sql/teamseasons.sql | sqlite3 baseball.db
|
|
|
|
cat sql/teams.sql | sqlite3 baseball.db
|
|
|
|
cat sql/yearlyawards.sql | sqlite3 baseball.db
|
2024-01-26 01:34:10 +00:00
|
|
|
sqlite3 baseball.db "VACUUM"
|
2024-01-27 22:42:08 +00:00
|
|
|
|
|
|
|
baseball-raw.db:
|
|
|
|
rm -f baseball-raw.db
|
2024-05-05 01:58:04 +00:00
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AllstarFull.csv allstarfull"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Appearances.csv appearances"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Batting.csv batting"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/BattingPost.csv battingpost"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Fielding.csv fielding"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/FieldingOF.csv fieldingof"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/FieldingOFsplit.csv fieldingofsplit"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/FieldingPost.csv fieldingpost"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/HomeGames.csv homegames"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Managers.csv managers"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/ManagersHalf.csv managershalf"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Parks.csv parks"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/People.csv people"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Pitching.csv pitching"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/PitchingPost.csv pitchingpost"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/SeriesPost.csv seriespost"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Teams.csv teams"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/TeamsFranchises.csv teamsfranchises"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/TeamsHalf.csv teamshalf"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsManagers.csv awardsmanagers"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsPlayers.csv awardsplayers"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsShareManagers.csv awardssharemanagers"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/AwardsSharePlayers.csv awardsshareplayers"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/CollegePlaying.csv collegeplaying"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/HallOfFame.csv halloffame"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Salaries.csv salaries"
|
|
|
|
sqlite3 baseball-raw.db ".import --csv $(bbdb)/Schools.csv schools"
|