reset (Prisma CLI v7)
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.
For use in development environments only.
prisma migrate reset [options]The datasource URL configuration is read from the Prisma config file (e.g., prisma.config.ts).
How it works
Section titled “How it works”- Drops the database/schema if possible, or performs a soft reset if the environment doesn't allow it
- Creates a new database/schema with the same name
- Applies all migrations
Options
Section titled “Options”| 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 |
Examples
Section titled “Examples”Reset the database
Section titled “Reset the database”bunx prisma migrate resetpnpm prisma migrate resetyarn prisma migrate resetnpx prisma migrate resetSkip confirmation prompt
Section titled “Skip confirmation prompt”bunx prisma migrate reset --forcepnpm prisma migrate reset --forceyarn prisma migrate reset --forcenpx prisma migrate reset --forceSpecify a schema path
Section titled “Specify a schema path”bunx prisma migrate reset --schema=./alternative/schema.prismapnpm prisma migrate reset --schema=./alternative/schema.prismayarn prisma migrate reset --schema=./alternative/schema.prismanpx prisma migrate reset --schema=./alternative/schema.prismaAI safety guardrails
Section titled “AI safety guardrails”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:
- Explain what action it's attempting
- Warn that this action irreversibly destroys all data
- Confirm whether this is a development or production database
- Ask for your explicit consent before proceeding
After consent, the AI sets the PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION environment variable and reruns the command.