🌐
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
Running prisma migrate deploy during the release phase · Ideally, migrate deploy should be part of an automated CI/CD pipeline, and we do not generally recommend running this command locally to deploy changes to a production database (for example, by temporarily changing the DATABASE_URL ...
🌐
Prisma
prisma.io › home › development and production › development and production › development and production › development and production
Development and production | Prisma Documentation
migrate deploy should generally be part of an automated CI/CD pipeline, and we do not recommend running this command locally to deploy changes to a production database. ... Compares applied migrations against the migration history and warns if any migrations have been modified: WARNING The following migrations have been modified since they were applied: 20210313140442_favorite_colors ... Does not detect drift (production database schema differs from migration history end state - for example, due to a hotfix)
Discussions

Where do you actually run prisma migrate deploy?
If you want an easy way to develop, I can recommend Planetscale which has a very generous free tier. It's a mysql db service that has branches like your code. That means you can develop code locally, run prisma db push and then merge the dev branch of your db into prod when you want. More on reddit.com
🌐 r/node
18
4
December 11, 2022
För de som använder Prisma, använder ni `prisma migrate ...
🌐 r/node
July 14, 2022
Warning: Think twice before using Prisma in large projects
Hey there, I'm Nikolas from the Prisma team. Thanks a lot for raising these issues, we're always looking to improve so we very much appreciate feedback like this! It sounds like your main issue revolves around the size of the generated index.d.ts file, right? (Since the TS server crashing and the worsened DX are consquences of that)? Thank you as well for already pointing to the open issue for this! I understand that it must be super frustrating to have your editor become slow and autocomplete stop working because of that (and honestly, having an issue open for 4,5 yars sounds equally frustrating to me). I will raise the urgency of this to our Engineering team and hope that we'll get to this soon. We actually recently changed our approach to OSS governance and made it more transparent, exactly because of issues like that one that have been around for so long. In the meantime, could I ask you to add a comment to the issue? Ideally, you can also share your schema (maybe in a GitHub Gist ?) so that our engineers can reproduce it? Regarding JOINs, we released native DB-level joins that are using a mix of LATERAL joins and JSON aggregation about one year ago, so hopefully there shouldn't be any issues around that any more. If you do end up seeing slow queries, please open an issue ! We've invested a lot into performance in the last 1-2 years and are eager to fix any slow query we become aware of. Thanks again for sharing this and please let me know if I can help in any other way! More on reddit.com
🌐 r/nextjs
132
238
January 27, 2025
How to dockerize Node + Prisma
This tutorial looks like it explains everything you need to know. I'm not sure what running Prisma as a separate service means; Prisma is simply an ORM (responsible for querying your database). Your application must handle HTTP requests - though many of these routes might be very thin layers over a call to Prisma. Your Dockerfile should be fairly straightforward at first - you don't need to overthink it. Have one build step where you install dependencies and build the package. Then one run step where you run docker CMD [server.js] or whatever your package is. The only difference from what you do when you run this locally is you'll want to use next build instead of running the development server. Good luck! More on reddit.com
🌐 r/node
21
14
April 3, 2023
🌐
Prisma
prisma.io › home › getting started with prisma migrate › getting started with prisma migrate › getting started with prisma migrate
Getting started with Prisma Migrate | Prisma Documentation
Your Prisma schema is once again in sync with your database schema, and your migration history contains two migrations: migrations/ └─ 20210313140442_init/ └─ migration.sql └─ 20210313140442_added_job_title/ └─ migration.sql · Your migration history can be committed to version control and use to deploy changes to test environments and production.
🌐
Prisma
prisma.io › home › deploy › deploy › deploy
prisma migrate deploy | Apply Migrations to Production | Prisma Documentation
The prisma migrate deploy command applies all pending migrations and creates the database if it doesn't exist.
🌐
Prisma
prisma.io › home › deploy migrations from a local environment › deploy migrations from a local environment › deploy migrations from a local environment › deploy migrations from a local environment
Deploy migrations from a local environment | Prisma Documentation
The pipeline should handle deployment to staging and production environments, and use migrate deploy in a pipeline step. See the deployment guides for examples. When you add Prisma Migrate to an existing database, you must baseline the production database.
🌐
Kitemetric
kitemetric.com › blogs › mastering-prisma-migrations-dev-vs-deploy
Mastering Prisma Migrations: Dev vs. Deploy | Kite Metric
For production or staging, prisma migrate deploy offers a safer approach. It only applies existing migrations from the prisma/migrations folder, ensuring predictability and preventing accidental schema alterations in a live environment. It skips drift detection and client regeneration, minimizing risk.
🌐
Prisma
prisma.io › home › expand-and-contract migrations › expand-and-contract migrations › expand-and-contract migrations
How to migrate data with Prisma ORM using the expand and contract pattern | Prisma Documentation
Set up your environment1.1. Review initial schema1.2. Configure Prisma1.3. Create a development branch2. Expand the schema2.1. Add new column2.2. Create migration3. Migrate the data3.1. Create migration script3.2. Set up migration script3.3. Execute migration4. Contract the schema4.1. Create cleanup branch4.2. Remove old column4.3. Generate cleanup migration5. Deploy to production5.1.
🌐
Reddit
reddit.com › r/node › where do you actually run prisma migrate deploy?
r/node on Reddit: Where do you actually run prisma migrate deploy?
December 11, 2022 -

I'm working on a little project with supabase and prisma, I've just been using one dev database which I update with prisma migrate dev. For production migrations, you're supposed to use prisma migrate deploy, which the prisma docs say to put in a CI/CD pipeline.

  • I don't have a CI/CD pipeline

  • I can't run it locally from my project directory, cause prisma uses the DATABASE_URL environment, which is pointing to my dev database

So I'm wondering where y'all would actually run prisma migrate deploy from? Should I just bite the bullet and learn some github actions? Or is there an easier way?

EDIT: The prisma docs recommend using dotenv-cli to use switch between .env files, but I'm kinda worried that I might fuck up somehow and end up running prisma migrate reset on my prod database, and delete everything. But, seems like that might be my plan until I figure out some CI/CD stuff.

Still definitely open to any advice though!

Find elsewhere
🌐
Pocketcmds
pocketcmds.com › skills › prisma › prisma-migration-workflow
Master Prisma Migrations for Production - Prisma AI Skill | PocketCmds
# Example: Rename column "name" to "fullName" # Migration 1: Add new column (expand) npx prisma migrate dev --name add_full_name_column ... -- Migration 1: Add column, copy data ALTER TABLE "User" ADD COLUMN "fullName" TEXT; UPDATE "User" SET ...
🌐
Medium
medium.com › @fardeenmansuri0316 › prisma-for-beginners-setting-up-migrating-and-querying-data-050fc401fa0d
Prisma for Beginners: Setting Up, Migrating, and Querying Data | by Fardeen Mansoori | Medium
February 21, 2025 - First, update your model in ... migrate these changes to the database so they reflect in your tables: npx prisma migrate dev --name added-age # (For production, use: "npx prisma migrate deploy") It’s also a good practice ...
🌐
Prisma
prisma.io › home › deploy to render › deploy to render › deploy to render › deploy to render › deploy to render
Deploy a Prisma app to Render | Prisma Documentation
In our example, prisma/seed.js defines some test users and posts. To add these users to the database, we can either: ... In the Render dashboard, navigate to your web service. Select Settings.
🌐
Prisma
prisma.io › home › understanding migrations › understanding migrations › understanding migrations › understanding migrations
A mental model for Prisma Migrate | Prisma Documentation
For example, this will happen when you add a required field to a table with existing content without providing a default value. ... A schema drift occurs when your database schema is out of sync with your migrations history and migrations table.
🌐
Prisma
prisma.io › home › overview of prisma migrate › overview of prisma migrate
Prisma Migrate: Database, Schema, SQL Migration Tool | Prisma Documentation
Prisma Migrate hence provides the flexibility of an imperative migration tool by enabling you to modify what and how migrations are executed (and allows you to run custom SQL to e.g. make use of native database feature, perform data migrations, ...). If you are prototyping, consider using the db push command - see Schema prototyping with db push for examples.
🌐
PlanetScale
planetscale.com › guides › frameworks and orms › prisma › automatic prisma migrations
Automatic Prisma migrations - PlanetScale
1 week ago - Let’s take a look: ... Close the proxy connection to your main branch (if still open) and connect to the new add-subtitle-to-posts development branch: pscale connect prisma-playground add-subtitle-to-posts --port 3309 ...
🌐
GitHub
github.com › prisma › prisma › discussions › 24571
How should migration be done to Production? · prisma/prisma · Discussion #24571
The SQL migration files located in the prisma/migrations directory. These files represent the history of changes made to your database schema. The prisma migrate deploy command applies all pending migrations found in this directory.
Author   prisma
🌐
DEV Community
dev.to › sagar_dewani › getting-to-know-prisma-a-beginners-guide-with-examples-48l5
Getting to Know Prisma: A Beginner’s Guide with Examples - DEV Community
February 27, 2025 - No Client Regeneration: The Prisma Client is typically built during the app’s deployment process, not during migration. For example, after running prisma migrate dev locally and committing the migration files, I deploy my app to production.
🌐
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
🌐
Stack Harbor
stackharbor.com › home › knowledge base › prisma migrations in production
Prisma migrations in production | Stack Harbor Knowledge Base
May 18, 2026 - Each migration is a directory under ... schema diff). prisma migrate deploy reads the directory, queries the table to find which are already applied, and runs the pending ones in transactions....