diff --git a/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx b/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx index f64a4979c6c..2c5cdf9862f 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx @@ -3,7 +3,7 @@ title: From scratch description: Set up Prisma ORM with PostgreSQL by hand, with one config file, one contract, and one index.ts. url: /prisma-orm/from-scratch metaTitle: Set up Prisma ORM from scratch -metaDescription: 'Add Prisma ORM 8 to an empty Node.js project without a template: install two packages, write prisma.config.ts and a contract, create the table, query it from one index.ts, and apply a migration.' +metaDescription: 'Add Prisma ORM 8 to an empty Node.js project without a template: install the packages, write prisma.config.ts and a contract, create the table, query it from one index.ts, and apply a migration.' --- By the end of this page you have a project with a `prisma.config.ts`, a `prisma/contract.prisma` holding one `User` model, and a single `index.ts` that writes, updates, and reads rows in PostgreSQL through Prisma ORM 8, plus a migration you planned and applied. No template generates anything: you create every file yourself and see what each one is for. @@ -36,18 +36,18 @@ npm init -y npm pkg set type=module ``` -Install the runtime library, the command-line tool, and the tooling to run a TypeScript file: +Install the runtime library, the packages it is built from, the command-line tool, and the tooling to run a TypeScript file: ```npm -npm install @prisma/orm-postgres pg dotenv -npm install --save-dev prisma tsx typescript @types/pg +npm install @prisma/orm-postgres @prisma/orm-framework @prisma/orm-family-sql @prisma/orm-target-postgres @prisma/orm-toolchain pg @types/pg temporal-polyfill dotenv +npm install --save-dev prisma tsx typescript ``` -`@prisma/orm-postgres` is the library your code imports, and `prisma` is the command-line tool. `pg` is the PostgreSQL driver, a peer dependency of `@prisma/orm-postgres`, and `@types/pg` gives TypeScript its types. `dotenv` loads `.env`, `tsx` runs `index.ts` without a build step, and `typescript` 5.9 or newer is a peer dependency of `@prisma/orm-postgres`. +`@prisma/orm-postgres` is the library your code imports, and `prisma` is the command-line tool. `@prisma/orm-postgres` is built from four platform packages: `@prisma/orm-framework`, `@prisma/orm-family-sql`, `@prisma/orm-target-postgres` and `@prisma/orm-toolchain`. Your code never imports them. `@prisma/orm-postgres` lists them as peer dependencies, packages it expects your app to install, so your app has exactly one copy of each. Because your app lists each one, the package manager installs one copy of each, which the library and every extension share. Two copies do not work together, so list them whichever package manager you use. [What your package.json lists](/orm/supported-databases#what-your-packagejson-lists) explains it in full. -`temporal-polyfill` is a peer dependency of `@prisma/orm-postgres` too. It adds `Temporal`, the newer JavaScript date and time API, to runtimes such as Node.js 24 that do not have it built in. npm installs it for you, but with Yarn you add it yourself. +`pg` is the PostgreSQL driver, another peer dependency of `@prisma/orm-postgres`, and `@types/pg` gives TypeScript its types. `temporal-polyfill` is a peer dependency too. It adds `Temporal`, the newer JavaScript date and time API, to runtimes such as Node.js 24 that do not have it built in. You import it yourself only when a field gives your code a `Temporal` value, which nothing on this page does; [Supported versions](/orm/supported-versions#runtimes) shows the import. `dotenv` loads `.env`, `tsx` runs `index.ts` without a build step, and `typescript` must be 5.9 or newer. -The two Prisma packages have different version numbers, for example `prisma` 8.0.0-rc.36 and `@prisma/orm-postgres` 8.0.0-rc.25. That is normal, and any two `latest` versions work together. +The command-line tool has its own version numbers, so `prisma` and `@prisma/orm-postgres` show different versions in `package.json`, which is expected. ## 2. Create the config file and `.env` diff --git a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx index f151e450b40..4dfef6f9145 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx @@ -56,12 +56,16 @@ written ├─ .gitattributes └─ package.json installed -├─ @prisma/orm-mongo +├─ @prisma/orm-mongo@8.0.0-rc.28 +├─ @prisma/orm-family-mongo@8.0.0-rc.28 +├─ @prisma/orm-framework@8.0.0-rc.28 +├─ @prisma/orm-target-mongo@8.0.0-rc.28 +├─ @prisma/orm-toolchain@8.0.0-rc.28 ├─ dotenv ├─ mongodb +├─ temporal-polyfill@^1.0.8 ├─ prisma@latest (dev) -├─ @types/node (dev) -└─ @prisma/cli-engine@0.10.4 (dev) +└─ @types/node (dev) ✔ Done. Open prisma-8.md to get started. ``` diff --git a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx index 1f95b0c4426..2551af51ffd 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx @@ -56,12 +56,17 @@ written ├─ .gitattributes └─ package.json installed -├─ @prisma/orm-postgres +├─ @prisma/orm-postgres@8.0.0-rc.28 +├─ @prisma/orm-family-sql@8.0.0-rc.28 +├─ @prisma/orm-framework@8.0.0-rc.28 +├─ @prisma/orm-target-postgres@8.0.0-rc.28 +├─ @prisma/orm-toolchain@8.0.0-rc.28 ├─ dotenv +├─ @types/pg@^8.20.0 ├─ pg +├─ temporal-polyfill@^1.0.8 ├─ prisma@latest (dev) -├─ @types/node (dev) -└─ @prisma/cli-engine@0.10.4 (dev) +└─ @types/node (dev) ✔ Done. Open prisma-8.md to get started. ``` diff --git a/apps/docs/content/docs/cli/orm-init.mdx b/apps/docs/content/docs/cli/orm-init.mdx index 180ba6d752d..6b0a9a6391a 100644 --- a/apps/docs/content/docs/cli/orm-init.mdx +++ b/apps/docs/content/docs/cli/orm-init.mdx @@ -28,15 +28,15 @@ npx prisma@latest orm init --yes --target postgres --authoring psl | Option | What it does | | --- | --- | -| `--target ` | Sets the database target: `postgres`, `mongodb`, or the name of a target package, such as `@prisma/orm-sqlite` or `@prisma/orm-mysql`. See [Set up another database with a target package](#any-target-package). | +| `--target ` | Sets the database target: `postgres`, `mongodb`, or the name of a database library, such as `@prisma/orm-sqlite` or `@prisma/orm-mysql`. See [Set up another database by its library](#any-target-package). | | `--authoring