Which Django command is used to apply all pending migrations to the database?
Correct answer
B. python manage.py migrate
14 views
B. python manage.py migrate
14 views
python manage.py migrate applies all pending migrations, creating or altering the database tables to match your models.
makemigrations only generates the migration files, createsuperuser creates an admin account and collectstatic gathers static files.
For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.