Running our initial migration
Now, it is necessary to create the initial migration for the new Toy
model we recently coded. We will also synchronize the SQLite database for the first time. By default, Django uses the popular self-contained and embedded SQLite database, and therefore we don't need to make changes in the initial ORM configuration. In this example, we will be working with this default configuration. Of course, we will upgrade to another database after we have a sample web service built with Django. We will only use SQLite for this example.
We just need to run the following Python script in the virtual environment that we activated in the previous chapter. Make sure you are in the restful01
folder within the main folder for the virtual environment when you run the following command:
python manage.py makemigrations toys
The following lines show the output generated after running the previous command:
Migrations for 'toys': toys/migrations/0001_initial.py: - Create model Toy
The...