apps/docs/content/docs/cli/migrate/deploy.mdx
The prisma migrate deploy command applies all pending migrations and creates the database if it doesn't exist. Primarily used in non-development environments.
:::warning
This command is not supported on MongoDB. Use db push instead.
:::
prisma migrate deploy [options]
The datasource URL configuration is read from the Prisma config file (e.g., prisma.config.ts).
| Option | Description |
|---|---|
-h, --help | Display help message |
--config | Custom path to your Prisma config file |
--schema | Custom path to your Prisma schema |
npx prisma migrate deploy
npx prisma migrate deploy --schema=./alternative/schema.prisma