Which command is used to apply database migrations in Django?

Which command is used to apply database migrations in Django?

a) python manage.py migrate
b) python manage.py runserver
c) python manage.py collectstatic
d) python manage.py test

Answer:

a) python manage.py migrate

Explanation:

The python manage.py migrate command is used to apply migrations, which update the database schema based on your models.

Reference:

Django Quiz – MCQ Questions and Answers

Scroll to Top