Go into your schema and make the change:

NormalizedName  String            @unique @db.VarChar(64)
NormalizedName  String?            @unique @db.VarChar(64)

Then create a draft migration:

$ npx prisma migrate dev --name migration-name --create-only

Then edit the migration in SQL (this allow null values ie optional)

ALTER TABLE myTable ALTER COLUMN myColumn {DataType} NULL;

OR Postgres

ALTER TABLE myTable ALTER COLUMN myColumn DROP NOT NULL;

etc.

Then apply the modified SQL:

$ npx prisma migrate dev

I hope this works for you :)

Answer from BlaviButcher on Stack Overflow
🌐
Prisma
prisma.io › home › reset › reset › reset
prisma migrate reset | Reset Database & Reapply Migrations | Prisma Documentation
Reset your database and apply all migrations. All data will be lost · The prisma migrate reset command resets your database and re-applies all migrations.
🌐
Prisma
prisma.io › home › development and production › development and production › development and production › development and production
Development and production | Prisma Documentation
The database schema has drifted away from the end-state of the migration history · You can also reset the database yourself to undo manual changes or db push experiments by running:
Discussions

node.js - Make a change to the database with Prisma.js without having to reset the whole thing - Stack Overflow
How can make a change to the database with Prisma.js without having to reset the whole thing? if I have used this command npx prisma migrate dev --name role-makeOptional-NormalizedName I will lose... More on stackoverflow.com
🌐 stackoverflow.com
How do I use Prisma without having to wipe my database all the time?
Think of it like this: You have a table with some users, none of which have a last name. Now you update schema.prisma with a required column called lastName, without a default value. How should Prisma handle the migration for you? Since Prisma can't guess the last name of every user, the only reasonable thing it can do is to ask you to recreate the data—which means resetting that table. To work around that, you need two migrations. You first set the column's default value to a placeholder—ensuring every row has a value. You then make a second migration where you remove the default value. This is, of course, just one of many reasons for why Prisma would want to reset a table, or sometimes even the whole database (if the effect is large enough). Prisma migrations are great, and they make life so much easier! But you still need to consider how they are applied and design your database accordingly: Prisma won't be able to magically solve the logical impossibilities that may occur otherwise. So, just like with everything else in programming, you need to be careful and considerate, and the more you practice; the easier it gets. I think Prisma sometimes overpromises on "making database design easy". It sure makes it easier, but you still need to think about what's going on behind the scenes. The way it abstracts the database design behind a neat little schema—together with its automatic migrations—can sometimes make you miss the forest for all the trees. More on reddit.com
🌐 r/node
39
34
December 5, 2023
Why does prisma migrate dev want to reset my db?
I'm trying to create a small migration with a column name change. I'm trying to understand why prisma migrate diff recognizes the simple change, but prisma migrate dev wants to reset the db. I am u... More on github.com
🌐 github.com
2
3
`prisma db reset` that resets the database, pushes the schema, and runs the seed function
I looked at npx prisma db push --force-reset which does steps 1 and 2, but it doesn't run the seed function. I looked at npx prisma migrate reset but that doesn't push the schema to the database and instead tries to run migrations, which I don't use in the early stages of a product. More on github.com
🌐 github.com
7
January 19, 2022
🌐
Prisma
prisma.io › home › migration histories › migration histories › migration histories › migration histories
About migration histories | Prisma Documentation
Run prisma migrate reset - Prisma Migrate resets the database and replays all migrations, including the migration you edited.
🌐
Medium
medium.com › @ayiaware › how-to-reset-your-postgresql-database-using-prisma-in-early-development-b36831b0f32b
How to Reset Your PostgreSQL Database Using Prisma in Early Development | by Daniel Ayia | Medium
September 14, 2025 - Reset the database to match the current schema. To simplify the reset process, you can create a custom script: "reset-db": "rm -rf prisma/migrations && npx prisma migrate dev --name init && npx prisma migrate reset --force"
🌐
GitHub
github.com › prisma › prisma › discussions › 10024
Reset and migrate database without seeding · prisma/prisma · Discussion #10024
Yes, this should be possible by passing --skip-seed option when running prisma migrate reset.
Author   prisma
🌐
Fig
fig.io › manual › prisma › migrate › reset
prisma migrate reset | Fig
Reset your database and apply all migrations, all data will be lost
Find elsewhere
🌐
Prisma
prisma.io › home › limitations and known issues › limitations and known issues › limitations and known issues › limitations and known issues
Limitations and known issues | Prisma Documentation
In a development environment, Prisma Migrate sometimes prompts you to reset the database. Resetting drops and recreates the database, which results in data loss.
🌐
Prisma
prisma.io › home › troubleshooting › troubleshooting › troubleshooting › troubleshooting
Troubleshooting | Prisma Documentation
If Prisma Migrate detects a migration history conflict when you run prisma migrate dev, the CLI will ask to reset the database and reapply the migration history.
🌐
Prisma
prisma.io › home › migrate › migrate
prisma migrate | Database Migration Commands | Prisma Documentation
# Create and apply a migration in development prisma migrate dev # Reset the database (development only) prisma migrate reset # Apply pending migrations in production prisma migrate deploy # Check migration status prisma migrate status # Compare database schemas prisma migrate diff \ --from-config-datasource \ --to-schema=./prisma/schema.prisma \ --script
🌐
Reddit
reddit.com › r/node › how do i use prisma without having to wipe my database all the time?
r/node on Reddit: How do I use Prisma without having to wipe my database all the time?
December 5, 2023 -

I'm using Prisma for a large project I've been working on for the past few months, and I still don't understand the flow of it. At first I was migrating every time I made a change to my schema, and constantly getting the "All data will be lost" prompt. Since then I've learned to use `db push` while developing and then migrate when a feature is finished, but it's still constantly making me reset my database.

Right now I'm using the same db for dev and staging (because I don't want to pay for 2 different ones) but I'd imagine this would still be an issue if I had separate databases. What do I need to do to stop being forced to reset my db? Or, at least, how would I migrate my development db to mirror my production db without it being wiped?

As you can probably tell, this is my first time working with Prisma (or any ORM, in depth) so this might be a stupid question, but I can't find much online besides general tutorials. Any help would be greatly appreciated!

Top answer
1 of 5
23
Think of it like this: You have a table with some users, none of which have a last name. Now you update schema.prisma with a required column called lastName, without a default value. How should Prisma handle the migration for you? Since Prisma can't guess the last name of every user, the only reasonable thing it can do is to ask you to recreate the data—which means resetting that table. To work around that, you need two migrations. You first set the column's default value to a placeholder—ensuring every row has a value. You then make a second migration where you remove the default value. This is, of course, just one of many reasons for why Prisma would want to reset a table, or sometimes even the whole database (if the effect is large enough). Prisma migrations are great, and they make life so much easier! But you still need to consider how they are applied and design your database accordingly: Prisma won't be able to magically solve the logical impossibilities that may occur otherwise. So, just like with everything else in programming, you need to be careful and considerate, and the more you practice; the easier it gets. I think Prisma sometimes overpromises on "making database design easy". It sure makes it easier, but you still need to think about what's going on behind the scenes. The way it abstracts the database design behind a neat little schema—together with its automatic migrations—can sometimes make you miss the forest for all the trees.
2 of 5
19
bruh
🌐
Prisma
prisma.io › home › generating down migrations › generating down migrations › generating down migrations › generating down migrations
Generating down migrations | Prisma Documentation
If your up migration was successful and you want to revert it, you will instead need to revert your schema.prisma file to its state before the up migration, and generate a new migration with the migrate dev command.
🌐
Prisma
prisma.io › home › patching & hotfixing › patching & hotfixing › patching & hotfixing › patching & hotfixing
Patching & hotfixing | Prisma Documentation
Patching the production database ... history. You can use the prisma migrate resolve command to reconcile your migration history without having to remove and re-apply the hotfix with prisma migrate deploy....
🌐
Prisma
prisma.io › home › prisma cli reference › prisma cli reference › prisma cli reference
Prisma CLI reference | Prisma Documentation
Apply all migrations, then create and apply any new migrations: ... Drops the database/schema if possible, or performs a soft reset if the environment does not allow deleting databases/schemas · Creates a new database/schema with the same name if the database/schema was dropped ... This command is not supported on MongoDB. Use db push instead. ... Prisma ORM includes built-in safety checks to prevent accidental destructive commands when run through AI coding assistants.
🌐
Fig
fig.io › manual › redwood › prisma › migrate › reset
redwood prisma migrate reset | Fig
Reset your database and apply all migrations, all data will be lost
🌐
GitHub
github.com › prisma › prisma › issues › 11261
`prisma db reset` that resets the database, pushes the schema, and runs the seed function · Issue #11261 · prisma/prisma
January 19, 2022 - Problem In the early stages of developing a new project, I find myself often repeating the following steps: Reset the database, using psql and drop database Push the new schema and regenerate the client, using npx prisma db pus...
Author   prisma