In this post, I'm trying to explain what makemigrations and migrate commands can do in Django.
We have these 2 commands in Django to create SQL commands:
Now let's see what exactly they are doing with our database.
- First we create a new model class in models.py
makemigrate: What will happen after this command?
It will generate the SQL command to create the table corresponding to each class you made in the models.py file.
The corresponding SQL command after creating your class models in models.py and using makemigrations will be