Skip to content

Commit 695d79f

Browse files
docs: --name on init --db names an existing project's database, not the project
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gregory Boch <boch@prisma.io>
1 parent 0f7e114 commit 695d79f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/docs/content/docs/(index)/prisma-orm/quickstart/postgresql.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The temporary database is deleted after 72 hours unless you claim it with a free
5353
npx prisma init --db --name my-app-db
5454
```
5555

56-
`init --db` opens your browser to sign you in if you are not signed in yet, creates a project and links the directory to it, then creates a Prisma Postgres database in that project and prints its connection string once. `--name` names the project and the database; name them differently from your app, so that the project does not collide with the one a later deploy creates. Mint another connection string later with `npx prisma postgres connection create my-app-db` if you need one. See [`init`](/cli/init) and [`postgres`](/cli/postgres).
56+
`init --db` opens your browser to sign you in if you are not signed in yet, creates a project and links the directory to it, then creates a Prisma Postgres database in that project and prints its connection string once. `--name` names the new project and the database (if the directory is already linked to a project, the database goes there and that project keeps its name); name them differently from your app, so that the project does not collide with the one a later deploy creates. Mint another connection string later with `npx prisma postgres connection create my-app-db` if you need one. See [`init`](/cli/init) and [`postgres`](/cli/postgres).
5757

5858
### Set the database connection [#2-set-the-database-connection]
5959

‎apps/docs/content/docs/cli/init.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ npx prisma@latest init --db --name my-app-db
3838
2. It creates a project and links the current directory to it, as [`project create`](/cli/project) does. If the directory is already linked to a project, it uses that project instead of creating another one.
3939
3. It creates a database in that project, as [`postgres create`](/cli/postgres) does, and prints its connection string once. Nothing writes it to a `.env` file, so save it now.
4040

41-
`--name` names the project and the database. Without it, both take the name of the current directory.
41+
`--name` names the database and, when `init` creates one, the project. A project the directory is already linked to keeps its name. Without `--name`, both take the name of the current directory.
4242

4343
### In a monorepo package
4444

@@ -53,7 +53,7 @@ npx prisma@latest init --postinstall --skills=claude,cursor
5353
| Option | What it does |
5454
| --- | --- |
5555
| `--db` | Also create a Prisma Postgres database: sign in if needed, create and link a project, create the database, and print its connection string once. See [With a database](#with-a-database). |
56-
| `--name <name>` | With `--db`: the name of the new project and database. Default: the current directory's name. |
56+
| `--name <name>` | With `--db`: the name of the database, and of the project when `init` creates one. Default: the current directory's name. |
5757
| `--region <region>` | With `--db`: the database's Prisma Postgres region, such as `eu-central-1`. |
5858
| `--skills <agents>` | Agents to install skills for, comma-separated: `claude`, `cursor`, `agents`, `devin`. Pass `none` to record that no agent skills are wanted. Default: all of them. |
5959
| `--postinstall`/`--no-postinstall` | Add the skills-sync `postinstall` hook and the `prisma` dev dependency. `--no-postinstall` skips both. Default: on, except in a monorepo package (see [In a monorepo package](#in-a-monorepo-package)). |

0 commit comments

Comments
 (0)