Prisma Error P3010: Migration Name Too Long

Prisma error P3010 (Migration Name Too Long) explained: what it means, why it happens, and how to fix it — with copy-paste code examples.

Error code P3010 Prisma Last verified 2026-08-19

Quick Answer

Rerun the command with a short, descriptive name under 200 characters. If that does not apply, avoid pasting whole error messages into --name; use a 2-6 word summary — the full checklist is below.

Error Code

Error code: P3010
Official name: Migration Name Too Long
Service: Prisma

What does this error mean?

The name of the migration is too long. It must not be longer than 200 characters (bytes).

Common Causes

How to Fix

  1. Rerun the command with a short, descriptive name under 200 characters
  2. Avoid pasting whole error messages into --name; use a 2-6 word summary
  3. If a migration was already created with a bad name, delete the folder and rerun with a clean name

Code Examples

Use a short name bash
npx prisma migrate dev --name add_user_role_index

Short kebab-case names stay under the 200-byte limit and read well in the migration history.

Framework-Specific Fixes

prisma-cli

Keep migration names short and kebab-case.

# too long:
npx prisma migrate dev --name this_is_an_extremely_long_description_that_keeps_going...
# correct:
npx prisma migrate dev --name add_user_role_index
github-actions

Generate migration names in CI from the PR title truncated to a safe length.

name: ${PR_TITLE:0:50}
run: npx prisma migrate dev --name ${{ steps.short.outputs.name }}
nestjs

Enforce a naming convention (verb + subject, kebab-case) in the contributing guide.

# migration names: add_<table>_<purpose>
# e.g. add_user_email_unique

You Might Also Like

Frequently Asked Questions

Why am I seeing Prisma error P3010?

Most often this happens when a --name argument longer than 200 characters (e.g. pasted error text or long generated descriptions), or when migration names containing characters or lengths that exceed the 200-byte limit.

How do I fix Prisma error P3010?

Rerun the command with a short, descriptive name under 200 characters.

Which frameworks have documented fixes for error P3010?

This page documents fixes for: prisma-cli, github-actions, nestjs.

Official Sources

This page is based on the official Prisma documentation linked below and adds practical troubleshooting guidance on top.