rembrembdocs

Workflows

Rapidly prototype your Prisma schema using db push without migrations

The Prisma CLI has a dedicated command for prototyping schemas: db push

db push uses the same engine as Prisma Migrate to synchronize your Prisma schema with your database schema. The db push command:

db push works well if:

See Schema prototyping with db push for an example of how to use db push in this way.

db push is not recommended if:

Yes, you can use db push and Prisma Migrate together in your development workflow . For example, you can:

The following scenario demonstrates how to use db push to synchronize a new schema with an empty database, and evolve that schema - including what happens when db push detects that a change will result in data loss.

At this point, the final draft of your prototyping is preserved in a migration and can be pushed to other environments (testing, production, or other members of your team).

Prototyping with an existing migration history

The following scenario demonstrates how to use db push to prototype a change to a Prisma schema where a migration history already exists.

At this point, the final result of your prototyping is preserved in a migration, and can be pushed to other environments (testing, production, or other members of your team).