lahmanlite/Makefile

40 lines
2.4 KiB
Makefile
Raw Normal View History

2024-01-25 05:44:50 +00:00
.PHONY: db
bbdb = baseballdatabank-2023.1
db: baseball.db
2024-01-26 03:43:23 +00:00
baseball.db: sql/corrections/*.sql sql/keys/*.sql sql/1nf/*.sql
2024-01-25 05:44:50 +00:00
rm -f baseball.db
sqlite3 baseball.db ".import --csv $(bbdb)/core/AllstarFull.csv allstarfull"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Appearances.csv appearances"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Batting.csv batting"
sqlite3 baseball.db ".import --csv $(bbdb)/core/BattingPost.csv battingpost"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Fielding.csv fielding"
sqlite3 baseball.db ".import --csv $(bbdb)/core/FieldingOF.csv fieldingof"
sqlite3 baseball.db ".import --csv $(bbdb)/core/FieldingOFsplit.csv fieldingofsplit"
sqlite3 baseball.db ".import --csv $(bbdb)/core/FieldingPost.csv fieldingpost"
sqlite3 baseball.db ".import --csv $(bbdb)/core/HomeGames.csv homegames"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Managers.csv managers"
sqlite3 baseball.db ".import --csv $(bbdb)/core/ManagersHalf.csv managershalf"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Parks.csv parks"
sqlite3 baseball.db ".import --csv $(bbdb)/core/People.csv people"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Pitching.csv pitching"
sqlite3 baseball.db ".import --csv $(bbdb)/core/PitchingPost.csv pitchingpost"
sqlite3 baseball.db ".import --csv $(bbdb)/core/SeriesPost.csv seriespost"
sqlite3 baseball.db ".import --csv $(bbdb)/core/Teams.csv teams"
sqlite3 baseball.db ".import --csv $(bbdb)/core/TeamsFranchises.csv teamsfranchises"
sqlite3 baseball.db ".import --csv $(bbdb)/core/TeamsHalf.csv teamshalf"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/AwardsManagers.csv awardsmanagers"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/AwardsPlayers.csv awardsplayers"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/AwardsShareManagers.csv awardssharemanagers"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/AwardsSharePlayers.csv awardsshareplayers"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/CollegePlaying.csv collegeplaying"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/HallOfFame.csv halloffame"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/Salaries.csv salaries"
sqlite3 baseball.db ".import --csv $(bbdb)/contrib/Schools.csv schools"
cat sql/corrections/*.sql | sqlite3 baseball.db
cat sql/keys/*.sql | sqlite3 baseball.db
2024-01-26 03:43:23 +00:00
cat sql/1nf/*.sql | sqlite3 baseball.db
2024-01-26 01:34:10 +00:00
sqlite3 baseball.db "VACUUM"