They serve two different environments. The prisma db push is not to be used in your production environment, as stated in the docs

db push uses the same engine as Prisma Migrate to synchronize your Prisma schema with your database schema, and is best suited for schema prototyping. The db push command:

  1. Introspects the database to infer and executes the changes required to make your database schema reflect the state of your Prisma schema.

  2. By default, after changes have been applied to the database schema, generators are triggered (for example, Prisma Client). You do not need to manually invoke prisma generate.

  3. If db push anticipates that the changes could result in data loss, it will:

  • Throw an error
  • Require the --accept-data-loss option if you still want to make the changes

Note: db push does not interact with or rely on migrations. The migrations table will not be updated, and no migration files will be generated.

The prisma migrate dev is used in you local environment, as explained in the docs

migrate dev is a development command and should never be used in a production environment.

This command:

  1. Replays the existing migration history in the shadow database in order to detect schema drift (edited or deleted migration file, or a manual changes to the database schema)
  2. Applies pending migrations to the shadow database (for example, new migrations created by colleagues)
  3. Generates a new migration from any changes you made to the Prisma schema before running migrate dev
  4. Applies all unapplied migrations to the development database and updates the _prisma_migrations table
  5. Triggers the generation of artifacts (for example, the Prisma Client)

The migrate dev command will prompt you to reset the database in the following scenarios:

  • Migration history conflicts caused by modified or missing migrations
  • The database schema has drifted away from the end-state of the migration history

If you have any other question regarding this, there is this comparison in the docs explaining when to use one or the other.

Answer from Daniel Olavio Ferreira on Stack Overflow
🌐
Prisma
prisma.io › home › push › push › push
prisma db push | Apply Schema to Database (No Migrations) | Prisma Documentation
The prisma db push command pushes the state of your Prisma schema to the database without using migrations.
🌐
Fig
fig.io › manual › prisma › db › push
prisma db push | Fig
prisma db push · prisma db seed · prisma db execute · prisma version · prisma version · prisma version --json · This command pushes the state of your Prisma schema file to the database without using migrations files · On this page ·
Discussions

Difference between prisma db push and prisma migrate dev - Stack Overflow
Note: db push does not interact with or rely on migrations. The migrations table will not be updated, and no migration files will be generated. The prisma migrate dev is used in you local environment, as explained in the docs · migrate dev is a development command and should never be used ... More on stackoverflow.com
🌐 stackoverflow.com
Is there anyway to add more items to the database without losing current data?
Managing schema changes without data loss is a common concern. The prisma db push command is designed to quickly synchronize your Prisma schema with your database schema. However, it does not generate migration files and is best suited for prototyping in a development environment. More on github.com
🌐 github.com
1
1
July 2, 2024
database - Why can't 'npx prisma db push' find my prisma schema? - Stack Overflow
Here's a reference for db push command. ... Sign up to request clarification or add additional context in comments. ... I was not in the root location, so stupid. 2023-03-10T18:10:28.793Z+00:00 ... Save this answer. ... Show activity on this post. npx prisma db push not working or not responding ... More on stackoverflow.com
🌐 stackoverflow.com
database - npx prisma db push command I try to push to MongoDB - Stack Overflow
I faced trouble when I use npx prisma db push command I try to push to MongoDB this is error message PS C:\Users\charith\Documents\GitHub\Full-Stack-Real-State-Website\server> npx prisma db push More on stackoverflow.com
🌐 stackoverflow.com
🌐
Prisma
prisma.io › home › prisma cli reference › prisma cli reference › prisma cli reference
Prisma CLI reference | Prisma Documentation
The db push command pushes the state of your Prisma schema to the database without using migrations.
🌐
Prisma
prisma.io › home › understanding migrations › understanding migrations › understanding migrations › understanding migrations
A mental model for Prisma Migrate | Prisma Documentation
You can then apply the changes to your database using prisma db execute command. The prisma db push command allows you to sync your Prisma schema and database schema without persisting a migration (/prisma/migrations).
🌐
Prisma
prisma.io › home › prototyping your schema › prototyping your schema › prototyping your schema › prototyping your schema
Prototyping your schema | Prisma Documentation
db push uses the same engine as Prisma Migrate to synchronize your Prisma schema with your database schema. The db push command:
Top answer
1 of 4
19

They serve two different environments. The prisma db push is not to be used in your production environment, as stated in the docs

db push uses the same engine as Prisma Migrate to synchronize your Prisma schema with your database schema, and is best suited for schema prototyping. The db push command:

  1. Introspects the database to infer and executes the changes required to make your database schema reflect the state of your Prisma schema.

  2. By default, after changes have been applied to the database schema, generators are triggered (for example, Prisma Client). You do not need to manually invoke prisma generate.

  3. If db push anticipates that the changes could result in data loss, it will:

  • Throw an error
  • Require the --accept-data-loss option if you still want to make the changes

Note: db push does not interact with or rely on migrations. The migrations table will not be updated, and no migration files will be generated.

The prisma migrate dev is used in you local environment, as explained in the docs

migrate dev is a development command and should never be used in a production environment.

This command:

  1. Replays the existing migration history in the shadow database in order to detect schema drift (edited or deleted migration file, or a manual changes to the database schema)
  2. Applies pending migrations to the shadow database (for example, new migrations created by colleagues)
  3. Generates a new migration from any changes you made to the Prisma schema before running migrate dev
  4. Applies all unapplied migrations to the development database and updates the _prisma_migrations table
  5. Triggers the generation of artifacts (for example, the Prisma Client)

The migrate dev command will prompt you to reset the database in the following scenarios:

  • Migration history conflicts caused by modified or missing migrations
  • The database schema has drifted away from the end-state of the migration history

If you have any other question regarding this, there is this comparison in the docs explaining when to use one or the other.

2 of 4
11
  • Prisma db push syncs (and formats) your prisma schema to that of your database schema.
  • While prisma migrate dev "command automatically generates SQL migration files (saved in /prisma/migrations) and applies them to the database".

The main difference between both is the generation of the migration files.

🌐
Prisma Client Python
prisma-client-py.readthedocs.io › en › stable › reference › command-line
Command Line - Prisma Client Python - Read the Docs
Prisma Client Python comes bundled with the Prisma CLI, all commands and arguments are the same. You can invoke the CLI using the installed console script: $ prisma db push · or by directly invoking the Prisma Client Python module: $ python -m prisma db push ·
Find elsewhere
🌐
PlanetScale
planetscale.com › guides › frameworks and orms › prisma › automatic prisma migrations
Automatic Prisma migrations - PlanetScale
1 week ago - From a high level, Prisma’s db push introspects your PlanetScale database to infer and execute the changes required to make your database schema reflect the state of your Prisma schema. When prisma db push is run, it will ensure the schema in the PlanetScale branch you are currently connected to matches your current Prisma schema...
🌐
Mintlify
mintlify.com › mintlify atlas › mintlify-atlas/docs-atlas-035637da › prisma db
prisma db - Prisma ORM
March 1, 2026 - ... Custom path to your Prisma config file. ... Custom path to your Prisma schema. ... Override the datasource URL from the Prisma config file. prisma db push --url="postgresql://user:password@localhost:5432/mydb"
🌐
Prisma
prisma.io › home › db › db
prisma db | Database Schema & Lifecycle Commands | Prisma Documentation
The prisma db command group provides tools to manage your database schema and lifecycle during development. ... # Pull schema from database prisma db pull # Push schema to database prisma db push # Seed the database prisma db seed # Execute a SQL script prisma db execute --file ./script.sql
🌐
MCP Servers
mcpservers.org › home › agent skills library › prisma-cli-db-push
prisma-cli-db-push | Agent Skills Library
Pushes schema changes directly to database without creating migrations. Ideal for prototyping. ... Completely resets database and applies schema. prisma db push prisma generate # Must run explicitly in v7
🌐
Stack Overflow
stackoverflow.com › questions › 77844181 › npx-prisma-db-push-command-i-try-to-push-to-mongodb
database - npx prisma db push command I try to push to MongoDB - Stack Overflow
PS C:\Users\charith\Documents\GitHub\Full-Stack-Real-State-Website\server> npx prisma db push Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Datasource "db": MongoDB database "RealEstateWebsite" at "cluster0.ouvsfq4.mongodb.net" Error: MongoDB error Kind: An error occurred during DNS resolution: proto error: io error: A socket operation was attempted to an unreachable network. (os error 10051), labels: {} 0: schema_core::commands::schema_push::Calculate `from` at schema-engine\core\src\commands\schema_push.rs:29 1: schema_core::state::SchemaPush at schema-engine\core\src\state.rs:433
🌐
MCP Market
mcpmarket.com › home › agent skills › prisma db push manager
Prisma DB Push Manager - Claude Code Skill
1 month ago - It handles the full lifecycle of a schema update: validating the schema, checking for destructive changes, pushing updates, regenerating the Prisma client, and restarting the API server.
🌐
Prisma
prisma.io › home › deploying database changes with prisma migrate › deploying database changes with prisma migrate › deploying database changes with prisma migrate › deploying database changes with prisma migrate
Deploying database changes with Prisma Migrate | Prisma Documentation
For more information about the migrate deploy command, see: ... As part of your CI/CD, you can run prisma migrate deploy as part of your pipeline to apply pending migrations to your production database.