You have a Next.js app using Prisma for database migrations. After running prisma migrate dev, what happens to your database schema?
Think about what prisma migrate dev does to keep your database and Prisma schema in sync.
Running prisma migrate dev updates your database schema to match your Prisma schema and creates a migration file to track changes.
Which of the following Prisma migration schema snippets correctly adds a new email field to a User model?
Consider the data type for an email address and whether it should be optional.
The email field should be a required String type to store email addresses correctly.
You run prisma migrate dev but get an error about conflicting migrations. What is the likely cause?
Think about what happens when multiple migrations try to change the same part of the database.
Conflicting migrations occur when two migration files try to modify the same table or column in incompatible ways, causing errors.
After applying several migrations, you run prisma migrate reset. What is the state of your database?
Consider what prisma migrate reset does to the database and migrations.
This command drops the database, recreates it, and reapplies all migrations to start fresh.
You want to deploy a Next.js app with Prisma to production. Which migration strategy ensures safe schema updates without data loss?
Think about how to safely update a live database without losing data.
prisma migrate deploy applies existing migration files safely in production without resetting or losing data.