django-models-2

Last Updated :
Discuss
Comments

What happens when python manage.py makemigrations is run after adding a new field to a model, and how is this different from running the migrate command?

It applies SQL changes directly to the database while migrate creates Python files for schema tracking

It only checks field types without creating any files while migrate resolves app dependencies

It creates Python migration files that record the schema change while migrate applies those migration files to the database

It compiles model code into bytecode while migrate runs tests related to schema updates

Tags:
Share your thoughts in the comments