Bird
0
0

Which command applies the migration scripts to update the database schema?

easy📝 Conceptual Q2 of 15
Flask - Deployment
Which command applies the migration scripts to update the database schema?
Aflask db upgrade
Bflask db migrate
Cflask db init
Dflask db create
Step-by-Step Solution
Solution:
  1. Step 1: Differentiate migration commands

    "flask db migrate" generates migration scripts but does not apply them.
  2. Step 2: Identify the command that applies changes

    "flask db upgrade" runs the migration scripts to update the database schema.
  3. Final Answer:

    flask db upgrade -> Option A
  4. Quick Check:

    Apply migration = flask db upgrade [OK]
Quick Trick: "upgrade" applies changes, "migrate" only creates scripts [OK]
Common Mistakes:
MISTAKES
  • Using migrate instead of upgrade to apply changes
  • Confusing init with upgrade
  • Assuming create is a valid command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes