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
22 changes: 18 additions & 4 deletions content/200-orm/500-reference/200-prisma-cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1195,11 +1195,16 @@ export default defineConfig({

| Options | Required | Description |
| :------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------- |
| `--skip-generate` | No | Skip generation of artifacts such as Prisma Client |
| `--force-reset` | No | Resets the database and then updates the schema - useful if you need to start from scratch due to unexecutable migrations. |
| `--accept-data-loss` | No | Ignore data loss warnings. This option is required if as a result of making the schema changes, data may be lost. |
| `--help` / `--h` | No | Displays the help message |

:::warning

The `--skip-generate` flag was removed in Prisma 7. `db push` no longer runs `prisma generate` automatically. Run it explicitly if needed.

:::

#### Arguments

| Argument | Required | Description | Default |
Expand Down Expand Up @@ -1362,14 +1367,19 @@ The `migrate dev` command:
1. Applies pending migrations to the shadow database (for example, new migrations created by colleagues)
1. Generates a new migration from any changes you made to the Prisma schema before running `migrate dev`
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)

:::warning

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

:::

:::info

**Prisma 7**: `migrate dev` no longer automatically triggers `prisma generate` or seed scripts. Run `prisma generate` explicitly if needed.

:::

See also:

- [Conceptual overview of Prisma Migrate](/orm/prisma-migrate)
Expand All @@ -1380,11 +1390,15 @@ See also:
| Option | Required | Description | Default |
| :---------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| `--create-only` | No | Creates a new migration but does not apply it. This also works if you haven't made any changes to your schema (in that case, an empty migration is created). Run `migrate dev` to apply migration. | |
| `--skip-seed` | No | Skip triggering seed | |
| `--skip-generate` | No | Skip triggering generators (for example, Prisma Client) | |
| `--name` / `-n` | No | Name the migration (e.g. `prisma migrate dev --name added_job_title`) | |
| `--help` / `-h` | No | Displays the help message | |

:::warning

The `--skip-generate` and `--skip-seed` flags were removed in Prisma 7. `migrate dev` no longer runs `prisma generate` or seeds automatically. Run them explicitly if needed.

:::

:::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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ To seed your database in v7, you must explicitly run:
npx prisma db seed
```

### CLI flags `--skip-generate` and `--skip-seed` removed

The `--skip-generate` flag was removed from `prisma migrate dev` and `prisma db push`. The `--skip-seed` flag was removed from `prisma migrate dev`.

`migrate dev` and `db push` no longer run `prisma generate` automatically. You must run `prisma generate` explicitly to generate Prisma Client.

### Various environment variables have been removed

We've removed a small selection of Prisma-specific environment variables.
Expand Down
Loading