Bird
0
0

Which of the following is the correct syntax to create a new Alembic migration with a message?

easy📝 Syntax Q3 of 15
FastAPI - Database Integration
Which of the following is the correct syntax to create a new Alembic migration with a message?
Aalembic migrate create "add new column"
Balembic revision -m "add new column"
Calembic create revision -m add new column
Dalembic new migration -msg "add new column"
Step-by-Step Solution
Solution:
  1. Step 1: Recall Alembic revision command syntax

    The correct command to create a migration is 'alembic revision' with the -m flag for message.
  2. Step 2: Check correct flag usage

    The message must be in quotes after -m, so alembic revision -m "add new column" matches the correct syntax.
  3. Final Answer:

    alembic revision -m "add new column" -> Option B
  4. Quick Check:

    Create migration syntax = revision -m [OK]
Quick Trick: Use 'alembic revision -m "message"' to create migrations [OK]
Common Mistakes:
MISTAKES
  • Using migrate instead of revision
  • Wrong flag like -msg instead of -m
  • Omitting quotes around the message

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FastAPI Quizzes