Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Overview on Prisma Migrate (Prisma ORM v6) (/docs/orm/v6/prisma-migrate/understanding-prisma-migrate/overview)

For the complete Prisma documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL.

Learn how Prisma Migrate keeps your database schema in sync with your Prisma schema.

Location: ORM > v6 > Prisma Migrate > Understanding Prisma Migrate > Overview on Prisma Migrate

[!NOTE] Does not apply for MongoDB
Instead of migrate dev and related commands, use db push for MongoDB.

Prisma Migrate enables you to:

  • Keep your database schema in sync with your Prisma schema as it evolves and
  • Maintain existing data in your database

Prisma Migrate generates a history of .sql migration files, and plays a role in both development and production.

Prisma Migrate can be considered a hybrid database schema migration tool, meaning it has both of declarative and imperative elements:

  • Declarative: The data model is described in a declarative way in the Prisma schema. Prisma Migrate generates SQL migration files from that data model.
  • Imperative: All generated SQL migration files are fully customizable. Prisma Migrate hence provides the flexibility of an imperative migration tool by enabling you to modify what and how migrations are executed (and allows you to run custom SQL to e.g. make use of native database feature, perform data migrations, ...).

[!NOTE] If you are prototyping, consider using the db push command - see Schema prototyping with db push for examples.

See the Prisma Migrate reference for detailed information about the Prisma Migrate CLI commands.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu