Django Tutorial: Makemigrations VS Migrate in Django

preview_player
Показать описание
In this Django tutorial, we are going to take a look at a few very important commands used to build Django's databases. Django has two commands that are used when creating Django's database first one being Makemigrations and migrate. The two sound familiar and look familiar but they perform two different task. I have found that two can be confusing for some people so my goal here is to try to better explain what each one does and the appropriate times to use this command.

How To Make Django App Available To Django Project

Рекомендации по теме
Комментарии
Автор

Hi, thanks for the informative video. So from my understanding, we call the 'makemigrations' and 'migrate' commands when we make a change in the models.py file. Then why is the full command 'python MANAGE.PY makemigrations lessons' instead of 'python MODELS.PY makemigrations lessons' since that's the file we care about? Totally new to Django.. I feel like there is something fundamental I am not getting lol!

conintava
Автор

thank you so much for the tutorial.
how to cancel makemigrations before the actual migration to the DB?

AlJahhaaf