# deploy (/docs/cli/migrate/deploy)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Apply pending migrations to update the database schema in production/staging

Location: CLI > migrate > deploy

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](https://www.prisma.io/docs/orm/core-concepts/supported-databases/mongodb). Use [`db push`](https://www.prisma.io/docs/cli/db/push) instead.

## Usage [#usage]

```bash
prisma migrate deploy [options]
```

The datasource URL configuration is read from the Prisma config file (e.g., `prisma.config.ts`).

## Characteristics [#characteristics]

* Does **not** look for drift in the database or changes in the Prisma schema
* Does **not** reset the database or generate artifacts
* Does **not** rely on a shadow database

## Options [#options]

| Option         | Description                            |
| -------------- | -------------------------------------- |
| `-h`, `--help` | Display help message                   |
| `--config`     | Custom path to your Prisma config file |
| `--schema`     | Custom path to your Prisma schema      |

## Examples [#examples]

### Deploy pending migrations [#deploy-pending-migrations]

  

#### bun

```bash
bunx prisma migrate deploy
```

#### pnpm

```bash
pnpm dlx prisma migrate deploy
```

#### yarn

```bash
yarn dlx prisma migrate deploy
```

#### npm

```bash
npx prisma migrate deploy
```

### Specify a schema path [#specify-a-schema-path]

  

#### bun

```bash
bunx prisma migrate deploy --schema=./alternative/schema.prisma
```

#### pnpm

```bash
pnpm dlx prisma migrate deploy --schema=./alternative/schema.prisma
```

#### yarn

```bash
yarn dlx prisma migrate deploy --schema=./alternative/schema.prisma
```

#### npm

```bash
npx prisma migrate deploy --schema=./alternative/schema.prisma
```

## Related pages

- [`dev`](https://www.prisma.io/docs/cli/migrate/dev): Create a migration from changes in Prisma schema, apply it to the database, and trigger generators
- [`diff`](https://www.prisma.io/docs/cli/migrate/diff): Compare the database schema from two arbitrary sources
- [`reset`](https://www.prisma.io/docs/cli/migrate/reset): Reset your database and apply all migrations. All data will be lost
- [`resolve`](https://www.prisma.io/docs/cli/migrate/resolve): Resolve issues with database migrations in deployment databases
- [`status`](https://www.prisma.io/docs/cli/migrate/status): Check the status of your database migrations