1. Create an app, python manage.py startapp appname
2. Design the model and edit the model in the appname/ directory
3. Detect model modifications, python manage.py makemigrations appname
4. Automatically perform database migration and manage the database structure synchronously, python manage.py sqlmigrate 0001
5. Create a data table of the newly defined model in the database python manage.py migrate
Steps to change the model:
python manage.py makemigrations
to generate migration files for model changes. python manage.py migrate
to apply the database migration.