Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Prisma · Command

prisma migrate reset

Resets a development database or schema and reapplies all migrations, destroying existing data. It requires confirmation unless --force is supplied.

How it works

The command resets the database or schema when possible, recreates it with the same name when needed, and reapplies all migrations. It is intended only for development and requires explicit consent unless you pass --force.

Syntax

prisma migrate reset [options]

Parameters

NameTypeDescription
-h, --helpflagDisplay command help.
--configoptionPath to a custom Prisma config file.
--schemaoptionPath to a custom Prisma schema.
-f, --forceflagSkip the confirmation prompt.

Returns

Resets the configured database or schema and reapplies all migrations; the CLI reports the operation's result.

Key points

  • It rebuilds the configured development database and replays the entire migration history.
  • The reset uses a full drop when the environment permits it, otherwise it falls back to a soft reset.
  • After a successful drop, Prisma recreates the database or schema under its original name.
  • Every migration in the project is applied again after the reset.
  • The command normally pauses for confirmation before performing the destructive operation.
  • The target datasource comes from the Prisma configuration rather than a positional command argument.

Common mistakes

  • Do not run this command against production data; the reset is destructive.
  • Treat the operation as irreversible for existing database contents.
  • Use db push instead when the datasource is MongoDB.
  • With Prisma v7, run npx prisma db seed separately if you need seed data.

Example: Reset a development database

npx prisma migrate reset --force

Resets the configured development database without asking for confirmation, then reapplies every migration.

When to use it

Restore migration-defined state

Undo manual database changes or experiments made with db push during development.

Rebuild after drift

Resolve migration-history conflicts or schema drift in a development database.

Start from a clean baseline

Recreate a clean local database from the committed migration history.

Interview questions

QWhat does prisma migrate reset do?

It is a development-only command that resets the database or schema and reapplies the complete migration history. Existing data is destroyed during the reset.

Follow-up: How can the command avoid an interactive confirmation? Pass --force, which skips the confirmation prompt.

QWhat are the reset steps?

The command can drop the database or schema when supported; otherwise, it performs a soft reset. It then creates a replacement with the same name when necessary and applies all migrations.

Follow-up: What configuration controls the datasource? The datasource URL is read from the Prisma config file, such as prisma.config.ts.

QWhich options and database limitation matter most?

Use --force to bypass the confirmation prompt, --schema to select another Prisma schema, and --config to select another Prisma config file. The command is not supported for MongoDB.

Follow-up: What should be used for MongoDB? Use prisma db push instead.

  • prisma migrate dev
  • prisma db push
  • prisma db seed
  • prisma.config.ts

Source: prisma migrate reset | Reset Database & Reapply Migrations .... Checked 2026-10-16.