1. Home
  2. Computer Science MCQs
  3. Django
  4. Which Django command is used to create a new database…

Added 28 Apr 2024

Which Django command is used to create a new database migration?

  1. python manage.py migrate
  2. python manage.py makemigrations Correct answer
  3. python manage.py collectstatic
  4. python manage.py runserver

Correct answer

B. python manage.py makemigrations

13 views

MCQSEXAM

Explanation

python manage.py makemigrations creates new migration files from the changes you made to your models.

It does not touch the database; migrate is the command that applies the migrations. Remember the order: makemigrations, then migrate.

Practise more Computer Science MCQs with answers and explanations on MCQsExam.com.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Django MCQs

Practise all Django MCQs

Similar MCQs