Running migrations

Now run the following Python script to generate the migrations that will allow us to synchronize the database for the first time. Make sure you are in the games_service folder within the root folder for the virtual environment (Django01). Notice that we use the Django app name, games, and not the PostgreSQL database name, django_games in the next script:

    python manage.py makemigrations games

The following lines show the output generated after running the previous command:

    Migrations for 'games':
      games/migrations/0001_initial.py
        - Create model EsrbRating
        - Create model Game
        - Create model Player
        - Create model PlayerScore

The output indicates that the games_service/games/migrations/0001_initial.py file includes ...

Get Hands-On RESTful Python Web Services - Second Edition 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.