Bird
0
0

What is the first command you should run to set up Flask-Migrate in a new Flask project?

easy📝 Syntax Q3 of 15
Flask - Deployment
What is the first command you should run to set up Flask-Migrate in a new Flask project?
Aflask run
Bflask db migrate
Cflask db upgrade
Dflask db init
Step-by-Step Solution
Solution:
  1. Step 1: Run flask db init

    This command initializes the migration environment by creating the migrations folder and necessary scripts.
  2. Step 2: Understand subsequent commands

    After initialization, you can create migration scripts with flask db migrate and apply them with flask db upgrade.
  3. Final Answer:

    flask db init -> Option D
  4. Quick Check:

    Initialization is always the first step [OK]
Quick Trick: Initialize migrations first with flask db init [OK]
Common Mistakes:
MISTAKES
  • Running migrate before init
  • Trying to upgrade before migrations exist
  • Confusing flask run with migration commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes