Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metaTitle: 'Debugging (Reference)'
metaDescription: 'This page explains how to enable debugging output for Prisma Client by setting the `DEBUG` environment variable.'
---

<TopBlock>

You can enable debugging output in Prisma Client and Prisma CLI via the [`DEBUG`](/orm/reference/environment-variables-reference#debug) environment variable. It accepts two namespaces to print debugging output:

Expand All @@ -13,13 +12,11 @@ You can enable debugging output in Prisma Client and Prisma CLI via the [`DEBUG`
- `prisma*`: Prints all debug messages from Prisma Client or CLI
- `*`: Prints all debug messages

<Admonition type="info">
:::info

Prisma Client can be configured to log warnings, errors and information related to queries sent to the database. See [Configuring logging](/orm/prisma-client/observability-and-logging/logging) for more information.

</Admonition>

</TopBlock>
:::

## Setting the `DEBUG` environment variable

Expand Down
72 changes: 36 additions & 36 deletions content/200-orm/500-reference/200-prisma-cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ generator client {
| `--allow-no-models` | No | The `generate` command will generate Prisma Client without generating any models. |
| `--watch` | No | The `generate` command will continue to watch the `schema.prisma` file and re-generate Prisma Client on file changes. |

<Admonition type="warning">
:::warning

**Deprecation Warning**

As of Prisma 5.2.0, `--data-proxy` and `--accelerate` are deprecated in favor of `--no-engine` as Prisma Client no longer requires an option to work with Prisma Accelerate. All options are available and work similarly, but we recommend `--no-engine` as it prevents an engine from being downloaded which will greatly impact the size of apps deployed to serverless and edge functions.

</Admonition>
:::

#### Arguments

Expand Down Expand Up @@ -675,32 +675,32 @@ For downloading engines
- BINARY_DOWNLOAD_VERSION:

For configuring the Query Engine Type
- PRISMA_CLI_QUERY_ENGINE_TYPE:
- PRISMA_CLIENT_ENGINE_TYPE:
- PRISMA_CLI_QUERY_ENGINE_TYPE: (Not supported in Prisma ORM v7)
- PRISMA_CLIENT_ENGINE_TYPE: (Not supported in Prisma ORM v7)

For custom engines
- PRISMA_QUERY_ENGINE_BINARY:
- PRISMA_QUERY_ENGINE_LIBRARY:
- PRISMA_QUERY_ENGINE_BINARY: (Not supported in Prisma ORM v7)
- PRISMA_QUERY_ENGINE_LIBRARY: (Not supported in Prisma ORM v7)
- PRISMA_SCHEMA_ENGINE_BINARY:
- PRISMA_MIGRATION_ENGINE_BINARY:

For the "postinstall" npm hook
- PRISMA_GENERATE_SKIP_AUTOINSTALL:
- PRISMA_SKIP_POSTINSTALL_GENERATE:
- PRISMA_GENERATE_IN_POSTINSTALL:
- PRISMA_GENERATE_SKIP_AUTOINSTALL: (Not supported in Prisma ORM v7)
- PRISMA_SKIP_POSTINSTALL_GENERATE: (Not supported in Prisma ORM v7)
- PRISMA_GENERATE_IN_POSTINSTALL: (Not supported in Prisma ORM v7)

For "prisma generate"
- PRISMA_GENERATE_DATAPROXY:
- PRISMA_GENERATE_NO_ENGINE:
- PRISMA_GENERATE_DATAPROXY: (Not supported in Prisma ORM v7)
- PRISMA_GENERATE_NO_ENGINE: (Not supported in Prisma ORM v7)

For Prisma Client
- PRISMA_SHOW_ALL_TRACES:
- PRISMA_CLIENT_NO_RETRY (Binary engine only):
- PRISMA_CLIENT_NO_RETRY (Binary engine only): (Not supported in Prisma ORM v7)

For Prisma Migrate
- PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK:
- PRISMA_MIGRATE_SKIP_GENERATE:
- PRISMA_MIGRATE_SKIP_SEED:
- PRISMA_MIGRATE_SKIP_GENERATE: (Not supported in Prisma ORM v7)
- PRISMA_MIGRATE_SKIP_SEED: (Not supported in Prisma ORM v7)

For Prisma Studio
- BROWSER:
Expand Down Expand Up @@ -815,17 +815,17 @@ npx prisma dev stop mydb* # stops all DBs starting with `mydb`

The `db pull` command connects to your database and adds Prisma models to your Prisma schema that reflect the current database schema.

<Admonition type="warning">
:::warning

**Warning**: The command will overwrite the current `schema.prisma` file with the new schema. Some manual changes or customization can be lost. Be sure to back up your current `schema.prisma` file (or commit your current state to version control to be able to revert any changes) before running `db pull` if it contains important modifications.

</Admonition>
:::

<Admonition type="info">
:::info

Introspection with the `db pull` command on the [MongoDB connector](/orm/overview/databases/mongodb) samples the data instead of reading a schema.

</Admonition>
:::

#### Prerequisites

Expand Down Expand Up @@ -1041,17 +1041,17 @@ prisma db seed

### `db execute`

<Admonition type="info">
:::info

The `db execute` command is Generally Available in versions 3.13.0 and later. If you're using a version between 3.9.0 and 3.13.0, it is available behind a `--preview-feature` CLI flag.

</Admonition>
:::

<Admonition type="warning">
:::warning

This command is currently not supported on [MongoDB](/orm/overview/databases/mongodb).

</Admonition>
:::

This command applies a SQL script to the database without interacting with the Prisma migrations table. The script takes two inputs:

Expand Down Expand Up @@ -1117,12 +1117,12 @@ Other options:

Prisma Migrate changed from Preview to Generally Available (GA) in 2.19.0.

<Admonition type="info">
:::info

**Does not apply for MongoDB** <br />
Instead of `migrate dev` and related commands, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).

</Admonition>
:::

### `migrate dev`

Expand All @@ -1136,11 +1136,11 @@ The `migrate dev` command:
1. Applies all unapplied migrations to the development database and updates the `_prisma_migrations` table
1. Triggers the generation of artifacts (for example, Prisma Client)

<Admonition type="warning">
:::warning

This command is not supported on [MongoDB](/orm/overview/databases/mongodb). Use [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) instead.

</Admonition>
:::

See also:

Expand All @@ -1157,11 +1157,11 @@ See also:
| `--name` / `-n` | No | Name the migration (e.g. `prisma migrate dev --name added_job_title`) | |
| `--help` / `-h` | No | Displays the help message | |

<Admonition type="info">
:::info

If a [schema drift](/orm/prisma-migrate/understanding-prisma-migrate/shadow-database#detecting-schema-drift) is detected while running `prisma migrate dev` using `--create-only`, you will be prompted to reset your database.

</Admonition>
:::

#### Arguments

Expand Down Expand Up @@ -1195,11 +1195,11 @@ This command:
1. Applies all migrations
1. Runs seed scripts

<Admonition type="warning">
:::warning

This command is not supported on [MongoDB](/orm/overview/databases/mongodb). Use [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) instead.

</Admonition>
:::

#### Options

Expand Down Expand Up @@ -1260,11 +1260,11 @@ The `migrate deploy` command applies all pending migrations, and creates the dat
- Does **not** reset the database or generate artifacts
- Does **not** rely on a shadow database

<Admonition type="warning">
:::warning

This command is not supported on [MongoDB](/orm/overview/databases/mongodb). Use [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) instead.

</Admonition>
:::

#### Options

Expand All @@ -1290,11 +1290,11 @@ The `migrate resolve` command allows you to solve migration history issues in pr

Note that this command can only be used with a failed migration. If you try to use it with a successful migration you will receive an error.

<Admonition type="warning">
:::warning

This command is not supported on [MongoDB](/orm/overview/databases/mongodb). Use [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) instead.

</Admonition>
:::

#### Options

Expand Down Expand Up @@ -1326,11 +1326,11 @@ prisma migrate resolve --rolled-back 20201231000000_add_users_table

The `prisma migrate status` command looks up the migrations in `./prisma/migrations/*` folder and the entries in the `_prisma_migrations` table and compiles information about the state of the migrations in your database.

<Admonition type="warning">
:::warning

This command is not supported on [MongoDB](/orm/overview/databases/mongodb). Use [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) instead.

</Admonition>
:::

For example:

Expand Down
Loading
Loading