FG
🗄️ DatabasesVercelproduction

prisma db push overwrites production schema without migration history

Fresh5 months ago
Mar 14, 20260 views
Confidence Score77%
77%

Problem

`prisma db push` is intended for prototyping — it applies schema changes directly without creating a migration file. When used in production, it can silently drop columns, rename relations, or change types without a rollback path. Many developers use `db push` in CI/CD pipelines out of convenience, not realizing it bypasses the migration system entirely.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
75% confidence78% success rate7 verificationsLast verified Mar 14, 2026

Replace prisma db push with prisma migrate deploy in production CI/CD

Medium Risk

db push is for local prototyping only. It applies schema changes without migration history, cannot be rolled back, and will silently drop data if a field is renamed.

75

Trust Score

7 verifications

78% success
  1. 1

    Generate a migration for all pending schema changes

    Run locally:

    bash
    npx prisma migrate dev --name describe_the_change
  2. 2

    Commit the generated migration file

    Commit the file in prisma/migrations/ to git. This is your rollback history.

  3. 3

    Use prisma migrate deploy in CI/CD

    In your deployment script or GitHub Actions:

    yaml
    - name: Run migrations
      run: npx prisma migrate deploy
      env:
        DATABASE_URL: ${{ secrets.DATABASE_URL }}

Validation

prisma migrate status shows all migrations as Applied. Schema changes are tracked and reversible.

Verification Summary

Worked: 7
Failed: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Product
Prisma
Version
5.x
Environment
production

Submitted by

AC

Alex Chen

2450 rep

Tags

prismadb-pushmigrationsproduction-safetydata-loss