Workflows
In this section
📄️ Seeding
This guide describes how to seed your database using Prisma Client and Prisma ORM's integrated seeding functionality. Seeding allows you to consistently re-create the same data in your database and can be used to:
📄️ Prototyping your schema
The Prisma CLI has a dedicated command for prototyping schemas: db push
📄️ Baselining a database
Baselining is the process of initializing a migration history for a database that:
📄️ Customizing migrations
This guide does not apply for MongoDB.
📄️ Data migrations
Prisma ORM does not yet natively support data migrations, but you can use the expand and contract pattern to migrate your data. For example from one column into another.
📄️ Squashing migrations
This guide describes how to squash multiple migration files into a single migration.
📄️ Generating down migrations
This guide describes how to generate a down migration SQL file that reverses a given migration file.
📄️ Patching & hotfixing
Patching or hotfixing a database involves making an often time critical change directly in production. For example, you might add an index directly to a production database to resolve an issue with a slow-running query.
📄️ Unsupported database features
Prisma Migrate uses the Prisma schema to determine what features to create in the database. However, some database features cannot be represented in the Prisma schema , including but not limited to:
📄️ Development and production
This page explains how to use Prisma Migrate commands in development and production environments.
📄️ Team development
To incorporate changes from collaborators:
📄️ Native database types
Prisma Migrate translates the model defined in your Prisma schema into features in your database.
📄️ Native database functions
In PostgreSQL, some native database functions are part of optional extensions. For example, in PostgreSQL versions 12.13 and earlier the genrandomuuid() function is part of the pgcrypto extension.
📄️ Troubleshooting
This guide describes how to resolve issues with Prisma Migrate in a development environment, which often involves resetting your database. For production-focused troubleshooting, see: