Django: Getting Started Transcripts
Chapter: DB Migrations
Lecture: A second migration script

Login or purchase this course to watch this video and the rest of the course contents.
0:00 This time the dependencies field has something inside of it. It states that the 0001 initial script in the music app needs to be run before
0:11 this script is run. That makes sense. If the table hasn't been created, adding a field to it would be problematic.
0:19 The operations list here shows the change to the model. Instead of creating a table, it is adding a column. The add field object has all the info
0:28 the migration script needs to do an alter table call. Adding the column to the database including a default value of blank for any existing data.
0:38 Alright, let's migrate this sucker. And by examining the schema, you can see that the change has been applied.


Talk Python's Mastodon Michael Kennedy's Mastodon