Bird
0
0

Which command should you run locally before deploying migration changes to production?

easy📝 Conceptual Q2 of 15
Django - Deployment and Production
Which command should you run locally before deploying migration changes to production?
Apython manage.py makemigrations
Bpython manage.py flush
Cpython manage.py runserver
Dpython manage.py migrate
Step-by-Step Solution
Solution:
  1. Step 1: Identify migration creation command

    makemigrations generates migration files based on model changes.
  2. Step 2: Understand deployment flow

    Migration files created locally are then deployed and applied in production using migrate.
  3. Final Answer:

    python manage.py makemigrations -> Option A
  4. Quick Check:

    Migration file creation = D [OK]
Quick Trick: Create migrations locally before deploying [OK]
Common Mistakes:
MISTAKES
  • Running migrate before makemigrations
  • Using runserver for migrations
  • Flushing database instead of migrating

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes