apps/docs/content/docs/cli/migrate/reset.mdx
The prisma migrate reset command resets your database and re-applies all migrations.
For use in development environments only.
:::warning
This command is not supported on MongoDB. Use db push instead.
:::
prisma migrate reset [options]
The datasource URL configuration is read from the Prisma config file (e.g., prisma.config.ts).
| Option | Description |
|---|---|
-h, --help | Display help message |
--config | Custom path to your Prisma config file |
--schema | Custom path to your Prisma schema |
-f, --force | Skip the confirmation prompt |
npx prisma migrate reset
npx prisma migrate reset --force
npx prisma migrate reset --schema=./alternative/schema.prisma
Prisma ORM includes built-in safety checks to prevent accidental destructive commands when run through AI coding assistants.
When AI agents like Claude Code, Cursor, Gemini CLI, or others attempt prisma migrate reset --force, Prisma blocks execution and shows a protective error message.
To proceed, you must provide explicit consent. The AI agent will:
After consent, the AI sets the PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION environment variable and reruns the command.