Bird
0
0

Which command applies all pending Prisma migrations to your database in a NestJS project?

easy📝 Conceptual Q2 of 15
NestJS - Database with Prisma
Which command applies all pending Prisma migrations to your database in a NestJS project?
Anpx prisma migrate deploy
Bnpx prisma migrate reset
Cnpx prisma migrate dev
Dnpx prisma migrate save
Step-by-Step Solution
Solution:
  1. Step 1: Understand migration commands

    To apply migrations in production or a deployed environment, migrate deploy is used.
  2. Step 2: Differentiate from other commands

    migrate dev is for development, migrate reset resets the database, and migrate save is deprecated.
  3. Final Answer:

    npx prisma migrate deploy -> Option A
  4. Quick Check:

    Apply migrations in production = migrate deploy [OK]
Quick Trick: Use migrate deploy to apply migrations in production [OK]
Common Mistakes:
  • Using migrate dev in production
  • Confusing migrate reset with deploy
  • Using deprecated migrate save command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NestJS Quizzes