PlanetScale Safe Migrations: DDL Statement Rejected

Share
Workaround available Web, CLI, Vitess (MySQL), Postgres Updated November 13, 2026Based on 2 user reportsHow we research

Quick answer

With safe migrations on, direct ALTER/CREATE statements on the main branch are rejected; use a development branch and a deploy request.

Most likely fix: Use a branch and deploy request

How to fix it

Try these in order — the most common fix is first.

  1. 1. Use a branch and deploy request

    1. Create a development branch
    2. Run your schema change there
    3. Open a deploy request and deploy it to main
    Did this fix it?
  2. 2. Point ORM migrations at a branch

    1. Use the branch connection string for prisma db push
    2. Then deploy via deploy request
    Did this fix it?
  3. 3. Disable safe migrations (not recommended)

    1. Database > Settings > Safe migrations off
    2. Risk: table locks and downtime on large tables
    Did this fix it?

Symptoms

Running ALTER TABLE or CREATE INDEX on the production branch returns a rejection error.

Why it happens

  • Safe migrations enabled on the production branch (by design)
  • Prisma db push or ORM migration run against production

This guide also covers

  • planetscale safe migrations
  • planetscale ddl rejected

Still not working?

If PlanetScale keeps failing, you're not alone. See every PlanetScale problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other PlanetScale errors

All 11 PlanetScale errors and fixes →