Skip to content
Open
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 @@ -114,7 +114,7 @@ Now that your project is in the correct location, continue with the setup.

Initialize a TypeScript project and add the Prisma CLI as a development dependency:

```bash
```npm
npm init -y
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metaDescription: Get started with Drizzle ORM and Prisma Postgres.

Create a new directory for your project and initialize it with npm:

```bash
```npm
mkdir drizzle-quickstart
cd drizzle-quickstart
npm init -y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metaDescription: Get started with Kysely and Prisma Postgres by creating a type-

Create a new directory for your project and initialize it with npm:

```bash
```npm
mkdir kysely-quickstart
cd kysely-quickstart
npm init -y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ typeorm-quickstart

Navigate to the project directory and install dependencies:

```bash
```npm
cd typeorm-quickstart
npm install
```
Expand Down Expand Up @@ -158,7 +158,7 @@ export const AppDataSource = new DataSource({

Start the application:

```bash
```npm
npm start
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/ai/tutorials/linktree-clone.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ The `--force-reset` flag deletes all existing data. This is fine during prototyp

Open Prisma Studio to verify the new schema is applied:

```bash
```npm
npm run db:studio
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/betterauth-astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In this guide, you'll wire Better Auth into a brand-new [Astro](https://astro.bu

Create a new Astro project:

```bash
```npm
npm create astro@latest betterauth-astro-prisma
```

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs.v6/guides/clerk-astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In this guide you'll wire Clerk into a brand-new [Astro](https://astro.build/) a

Create a new Astro project:

```bash
```npm
npm create astro@latest
```

Expand Down Expand Up @@ -408,7 +408,7 @@ npm run dev

In a separate terminal window, install ngrok globally and expose your local app:

```bash
```npm
npm install --global ngrok
ngrok http 4321
```
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/clerk-nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ You'll need to expose your local app for webhooks with [ngrok](https://ngrok.com

Install ngrok and expose your local app:

```bash
```npm
npm install --global ngrok
ngrok http 3000
```
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/content/docs.v6/guides/cloudflare-d1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Before starting this guide, make sure you have:

Run the following command to create a [new Cloudflare Worker project](https://developers.cloudflare.com/d1/get-started/#1-create-a-worker):

```bash
```npm
npm create cloudflare@latest d1-tutorial -- --type=hello-world --ts=true --git=true --deploy=false
```

Expand Down Expand Up @@ -176,7 +176,7 @@ mkdir -p prisma/migrations

Now use `prisma migrate diff` to generate the SQL needed to create your database schema:

```bash
```npm
npx prisma migrate diff \
--from-empty \
--to-schema prisma/schema.prisma \
Expand All @@ -189,7 +189,7 @@ This command generates a SQL file that contains the statements needed to create

Now apply the migration to both your local and remote D1 databases using Wrangler:

```bash
```npm
# Apply to local database
npx wrangler d1 execute __YOUR_D1_DATABASE_NAME__ --local --title="./prisma/migrations/0001_init.sql"

Expand All @@ -207,7 +207,7 @@ Replace `__YOUR_D1_DATABASE_NAME__` with the actual name of your D1 database tha

Let's create some dummy data that we can query once the Worker is running:

```bash
```npm
# For the local database
npx wrangler d1 execute __YOUR_D1_DATABASE_NAME__ --command "INSERT INTO \"User\" (\"email\", \"name\") VALUES ('jane@prisma.io', 'Jane Doe (Local)');" --local

Expand All @@ -219,7 +219,7 @@ npx wrangler d1 execute __YOUR_D1_DATABASE_NAME__ --command "INSERT INTO \"User\

For future schema changes, you can generate new migration files using:

```bash
```npm
npx prisma migrate diff \
--from-local-d1 \
--to-schema prisma/schema.prisma \
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/cloudflare-workers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab

Create a new Cloudflare Workers project:

```bash
```npm
npm create cloudflare@latest prisma-cloudflare-worker -- --type=hello-world --ts=true --git=true --deploy=false
```

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs.v6/guides/data-dog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ We will start by creating a new Node.js project to demonstrate tracing with Data

If you're integrating tracing into an existing Prisma project, you can skip this step and directly follow from [the setup tracing section](#4-set-up-datadog-tracing). Just make sure you apply the changes in your project's equivalent folder structure.

```bash
```npm
mkdir prisma-datadog-tracing
cd prisma-datadog-tracing
npm init -y
Expand Down Expand Up @@ -191,7 +191,7 @@ This creates the tables according to your schema in the Postgres database and ge

In addition to Prisma, you will need the following packages for Datadog tracing:

```bash
```npm
npm install @prisma/instrumentation \
dd-trace
```
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Let's start by creating a simple Node.js application with Prisma ORM and [Expres

First, create a new project directory and initialize a Node.js project:

```bash
```npm
mkdir docker-test
cd docker-test
npm init -y
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs.v6/guides/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Make sure you have the following:

Initialize your project:

```bash
```npm
mkdir prisma-gha-demo && cd prisma-gha-demo
npm init -y
```
Expand Down Expand Up @@ -222,7 +222,7 @@ Update your `package.json`:

Then run:

```bash
```npm
npm run seed
npx prisma studio
```
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/hono.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab

Create a new Hono project:

```bash
```npm
npm create hono@latest
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/management-api-basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cd management-api-demo

Next, initialize npm and install dependencies required for using TypeScript:

```bash
```npm
npm init -y
npm install tsx typescript @types/node --save-dev
touch index.ts
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/migrate-from-typeorm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class CreateUserAction {

Test all migrated endpoints to ensure they work as expected:

```bash
```npm
npm test
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/nuxt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This guide shows you how to set up Prisma ORM in a Nuxt application with [Prisma

Create a new Nuxt project and install dependencies:

```bash
```npm
npx nuxi@latest init hello-prisma
cd hello-prisma
npm install @prisma/client @prisma/adapter-pg pg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You'll also install the tools needed to support ReBAC filtering with Permit.io.

### 1.1 Create the project folder

```bash
```npm
mkdir prisma-rebac-filtering
cd prisma-rebac-filtering
npm init -y
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs.v6/guides/solid-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In this guide, you'll learn how to integrate Prisma ORM with a Prisma Postgres d

Begin by creating a new SolidStart app. In your terminal, run:

```bash
```npm
npm init solid@latest
```

Expand All @@ -38,7 +38,7 @@ Use the following options when prompted:

Next, navigate into your new project, install dependencies, and start the development server:

```bash
```npm
cd my-solid-prisma-app
npm install
npm run dev
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/sveltekit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ It will prompt you to customize your setup. Here are the options you'll choose:

Once the setup completes, navigate into your project and start the development server:

```bash
```npm
cd sveltekit-prisma
npm run dev
```
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/tanstack-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guide will walk you through integrating Prisma ORM with a Prisma Postgres d

To begin, create a new TanStack Start project.

```bash
```npm
npm create @tanstack/start@latest
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs.v6/guides/turborepo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ The `turborepo-prisma` project should have an app called `web` at `apps/web`. Ad

Run your package manager's install command inside the `apps/web` directory:

```bash tab="npm"
```npm tab="npm"
cd apps/web
npm install
```
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/content/docs.v6/orm/more/upgrades/older-versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Prisma ORM v6 introduced breaking changes related to Node.js versions, TypeScrip

### Upgrade command

```bash
```npm
npm install prisma@6 @prisma/client@6
```

Expand Down Expand Up @@ -75,7 +75,7 @@ prisma.user.findMany({

### Upgrade command

```bash
```npm
npm install prisma@5 @prisma/client@5
```

Expand Down Expand Up @@ -110,7 +110,7 @@ prisma.log.findMany({

### Upgrade command

```bash
```npm
npm install prisma@4 @prisma/client@4
```

Expand Down Expand Up @@ -147,7 +147,7 @@ After upgrading, run `npx prisma db pull` to sync constraint names, or run `npx

### Upgrade command

```bash
```npm
npm install prisma@3 @prisma/client@3
```

Expand All @@ -157,7 +157,7 @@ npm install prisma@3 @prisma/client@3

The `@prisma/codemods` package helps automate code changes when upgrading:

```bash
```npm
npx @prisma/codemods <transform> <path>
```

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs.v6/orm/more/upgrades/to-v7.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you are using MongoDB, please note that Prisma ORM v7 does not yet support Mo

To upgrade to Prisma ORM v7 from an earlier version, you need to update both the `prisma` and `@prisma/client` packages:

```bash tab="npm"
```npm tab="npm"
npm install @prisma/client@7
npm install -D prisma@7
```
Expand Down Expand Up @@ -252,7 +252,7 @@ For more details, see [GitHub issue #28795](https://github.com/prisma/prisma/iss
In Prisma ORM 7.0.0, environment variables are not loaded by default. Instead developers need to
explicitly load the variables when calling the `prisma` CLI. Libraries like [`dotenv`](https://github.com/motdotla/dotenv) can be used to manage loading environment variables by reading the appropriate `.env` file.

```bash tab="npm"
```npm tab="npm"
npm install dotenv
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ To generate the initial SQL statement, you can use the `prisma migrate diff` com

For the initial migration, you can use the special `--from-empty` option though:

```bash
```npm
npx prisma migrate diff \
--from-empty \
--to-schema ./prisma/schema.prisma \
Expand Down Expand Up @@ -186,7 +186,7 @@ As before, you now need to put a SQL statement into the currently empty `0002_cr

As explained above, you now need to use `--from-local-d1` instead of `--from-empty` to specify a source schema:

```bash
```npm
npx prisma migrate diff \
--from-local-d1 \
--to-schema ./prisma/schema.prisma \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const client = new PrismaClient();

Alternatively, you can use a linked dependency for cleaner imports.

```bash tab="npm"
```npm tab="npm"
npm add db@./generated/prisma
```

Expand Down
Loading
Loading