10.2 Last Week’s Episode (Reviewing Chapter 3)

A migration is simply a script that changes our database. It acts as version control for our database.

Migrations can change anything about the database. Given that a database is structured data, developers typically talk about modifying the structure, or schema, of the database, or else about changing the data in the database. Of course, it is also possible to do both at the same time.

Migration use is closely tied to the Don’t Repeat Yourself (DRY) principle. Generally, we make a change in our model and then want to reflect the change in the structure of our database (because a model is an abstract representation of data, whereas the database is the actual storage of this data). Migrations are ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.