Prisma error P3010 (Migration Name Too Long) explained: what it means, why it happens, and how to fix it — with copy-paste code examples.
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: P3010
Official name: Migration Name Too Long
Service: Prisma
The name of the migration is too long. It must not be longer than 200 characters (bytes).
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.
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
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 }}
Enforce a naming convention (verb + subject, kebab-case) in the contributing guide.
# migration names: add_<table>_<purpose>
# e.g. add_user_email_unique
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.
Rerun the command with a short, descriptive name under 200 characters.
This page documents fixes for: prisma-cli, github-actions, nestjs.
Recommendations are editorial — DB Error Reference takes no payment or affiliate fees for tool listings.
This page is based on the official Prisma documentation linked below and adds practical troubleshooting guidance on top.