Bird
0
0

Which command correctly runs all pending migrations in a NestJS project using TypeORM?

easy📝 Syntax Q12 of 15
NestJS - Database with TypeORM
Which command correctly runs all pending migrations in a NestJS project using TypeORM?
Anpx typeorm migration:create
Bnpx typeorm migration:revert
Cnpx typeorm migration:generate
Dnpx typeorm migration:run
Step-by-Step Solution
Solution:
  1. Step 1: Recall commands for migrations

    migration:run applies pending migrations to the database.
  2. Step 2: Differentiate from other commands

    migration:create creates a new migration file, migration:generate generates migration from schema changes, and migration:revert undoes the last migration.
  3. Final Answer:

    npx typeorm migration:run -> Option D
  4. Quick Check:

    Run migrations = migration:run [OK]
Quick Trick: Run migrations with migration:run command [OK]
Common Mistakes:
  • Using migration:create to run migrations
  • Confusing migration:generate with migration:run
  • Using migration:revert to apply migrations

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NestJS Quizzes