Chapter 6.
SQL migrations
Let’s get back to something a bit more concrete and tangible in this next section of the book, and take steps to create a movies table in our greenlight database.
To do this, we could simply use the psql tool again and run the necessary CREATE TABLE statement against our database. But instead, we’re going to explore how to use SQL migrations to create the table (and more generally, to manage database schema changes throughout the project).
You’ll learn about:
The high-level principles behind SQL migrations and why they are useful.
How to use the command-line
migratetool to programmatically manage changes to your database schema.