npx prisma migrate dev --name init

Category: Web App Development

npx prisma migrate dev --name init

Create and apply the first Prisma migration

Compares your Prisma schema with the database, generates a migration named init and applies it, then regenerates the client. The dev subcommand is for local databases and can be destructive with reset. Review the generated SQL in prisma/migrations before committing.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.