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 the code to create the EsrbRating
, Game
, Player
, and PlayerScore
models. The following lines show the code for this file that was automatically generated by Django and its integrated ORM. The code file for the sample is included in the restful_python_2_06_01...