![](https://bigmachine.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MTQ0LCJwdXIiOiJibG9iX2lkIn19--689f217d314dd91e6551b44e30aa744e89a7879b/eyJfcmFpbHMiOnsiZGF0YSI6e30sInB1ciI6InZhcmlhdGlvbiJ9fQ==--743878b0228ee81b4587d6ab790a4e67ea599217/rewrite-make.jpg)
Flexing Make
Buy or Subscribe
You can access this course in just a minute, and support my efforts to rid the world of crappy online courses!
Make is an old tool with one job: orchestrate shell commands. It's used to build things, and is the oldest build tool there is. We can use this power to build out our database!
rebuild: dev change schema migrate migrate: rails db:migrate schema: rails db:schema:dump dev: psql -q railz_development < db.sql change: psql -q railz_development < change.sql .PHONY: dev change migrate schema db
This file will run the commands in order, creating our dev database, running our SQL scripts, and finally any migrations.