O'Reilly logo

Django Unleashed by Andrew Pinkham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.5.2 Creating Migrations

Migration generation, like most other interactions with Django, occurs thanks to the manage.py script.

Before actually generating a migration, run the check command, shown in Example 3.23. Django will warn you if there are any typos or problems with your models.

Example 3.23: Shell Code

$ ./manage.py check System check identified no issues (0 silenced).

Satisfied with the output of check, we can then run the makemigrations command. In Example 3.24, I run the command twice, specifying each app.

Example 3.24: Shell Code

$ ./manage.py makemigrations organizer Migrations for 'organizer':   0001_initial.py:     - Create model NewsLink     - Create model Startup ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required