To create the database migrations, take a look at the following steps:
- When you create models in your new categories or ideas app, you have to create an initial migration that will create the database tables for your app. This can be done by using the following command:
(env)$ python manage.py makemigrations ideas
- The first time that you want to create all of the tables for your project, run the following command:
(env)$ python manage.py migrate
Run this command when you want to execute the new migrations for all of your apps.
- If you want to execute the migrations for a specific app, run the following command:
(env)$ python manage.py migrate ideas
- If you make some changes in the database schema, you will have to create ...