Bird
0
0

During deployment, you notice the database schema is not updated despite running flask db upgrade. What could cause this?

hard📝 Application Q9 of 15
Flask - Deployment
During deployment, you notice the database schema is not updated despite running flask db upgrade. What could cause this?
AThe database connection string is missing
BThe migration scripts were not committed and deployed
CThe Flask app is running in production mode
DThe server needs a reboot
Step-by-Step Solution
Solution:
  1. Step 1: Check migration script availability

    If migration scripts are missing on the server, upgrade cannot apply changes.
  2. Step 2: Confirm deployment includes migration files

    Scripts must be committed and deployed with the app code for upgrade to work.
  3. Final Answer:

    The migration scripts were not committed and deployed -> Option B
  4. Quick Check:

    Missing scripts = upgrade no effect [OK]
Quick Trick: Always commit migration scripts with code [OK]
Common Mistakes:
MISTAKES
  • Blaming production mode for schema update failure
  • Assuming missing connection string causes upgrade failure
  • Thinking server reboot fixes migration issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes