Prompt Buddy logoPrompt Buddy

prisma · Prisma Docs

Prisma Cloudflare D1 (/docs/guides/deployment/cloudflare-d1)

A guide for integrating Prisma ORM with Cloudflare D1, covering project initialization, schema configuration with the cloudflare runtime, dependency installation, and database binding via wrangler.jsonc.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Prisma Cloudflare D1 (/docs/guides/deployment/cloudflare-d1)

A guide for integrating Prisma ORM with Cloudflare D1, covering project initialization, schema configuration with the cloudflare runtime, dependency installation, and database binding via wrangler.jsonc.

When To Use

Use when you need to set up Prisma ORM to work with a Cloudflare D1 serverless SQL database and deploy it to Cloudflare Workers.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/prisma-cloudflare-d1-docs-guides-deployment-workflow-guide.mdA guide explaining how to use Prisma ORM with Cloudflare D1 serverless SQL database.Questions about a guide explaining how to use Prisma ORM with Cloudflare D1 serverless SQL database.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-setup-c.bashA bash command to initialize a new Cloudflare D1 project using the create-cloudflare CLI.Exact payloads, commands, or snippets shown in A bash command to initialize a new Cloudflare D1 project using the create-cloudflare CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-pnpm-cr.bashA bash command to initialize a Cloudflare D1 tutorial project using pnpm.Exact payloads, commands, or snippets shown in A bash command to initialize a Cloudflare D1 tutorial project using pnpm.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-setup-c-2.bashA bash command to initialize a Cloudflare D1 tutorial project using the create-cloudflare utility.Exact payloads, commands, or snippets shown in A bash command to initialize a Cloudflare D1 tutorial project using the create-cloudflare utility.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-bunx-cr.bashA bash command to initialize a Cloudflare D1 tutorial project using bunx.Exact payloads, commands, or snippets shown in A bash command to initialize a Cloudflare D1 tutorial project using bunx.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym.bashBash commands to navigate to the D1 tutorial directory and begin the deployment process.Exact payloads, commands, or snippets shown in Bash commands to navigate to the D1 tutorial directory and begin the deployment process.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-sqlite-.bashA bash command to initialize a Prisma project using the SQLite datasource provider for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to initialize a Prisma project using the SQLite datasource provider for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-sqlite--2.bashA bash command to initialize a Prisma project using the SQLite datasource provider for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to initialize a Prisma project using the SQLite datasource provider for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-sqlite--3.bashA bash command to initialize a Prisma project using the SQLite datasource provider for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to initialize a Prisma project using the SQLite datasource provider for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-sqlite--4.bashA bash command to initialize a Prisma project with the SQLite datasource provider using bunx.Exact payloads, commands, or snippets shown in A bash command to initialize a Prisma project with the SQLite datasource provider using bunx.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-2.bashThe bash command to install prisma as a development dependency for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in The bash command to install prisma as a development dependency for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-pnpm-in.bashA bash command to add prisma as a development dependency using pnpm for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to add prisma as a development dependency using pnpm for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-3.bashA bash command to add prisma as a development dependency using yarn for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to add prisma as a development dependency using yarn for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-bun-ins.bashA bash command to add prisma as a development dependency using the bun package manager for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to add prisma as a development dependency using the bun package manager for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-configu.prismaA Prisma schema file configured with the cloudflare runtime and sqlite provider for deployment to Cloudflare D1.Exact payloads, commands, or snippets shown in A Prisma schema file configured with the cloudflare runtime and sqlite provider for deployment to Cloudflare D1.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-install.bashBash commands to install the Prisma client, D1 adapter, and dotenv packages for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in Bash commands to install the Prisma client, D1 adapter, and dotenv packages for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-pnpm-in-2.bashBash commands to install the Prisma client, D1 adapter, and dotenv using pnpm for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in Bash commands to install the Prisma client, D1 adapter, and dotenv using pnpm for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-install-2.bashBash commands to install the Prisma client, D1 adapter, and dotenv packages for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in Bash commands to install the Prisma client, D1 adapter, and dotenv packages for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-bun-dep.bashA bash command sequence for installing the Prisma client, D1 adapter, and dotenv using the bun package manager.Exact payloads, commands, or snippets shown in A bash command sequence for installing the Prisma client, D1 adapter, and dotenv using the bun package manager.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle.bashA bash command to create a new Cloudflare D1 database using the Wrangler CLI.Exact payloads, commands, or snippets shown in A bash command to create a new Cloudflare D1 database using the Wrangler CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-2.bashA bash command using wrangler to create a new Cloudflare D1 database.Exact payloads, commands, or snippets shown in A bash command using wrangler to create a new Cloudflare D1 database.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-3.bashA bash command using wrangler to create a new Cloudflare D1 database for Prisma deployment.Exact payloads, commands, or snippets shown in A bash command using wrangler to create a new Cloudflare D1 database for Prisma deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-4.bashA bash command using wrangler to create a new Cloudflare D1 database.Exact payloads, commands, or snippets shown in A bash command using wrangler to create a new Cloudflare D1 database.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-databas.bashBash commands and expected output for creating a Cloudflare D1 database using Prisma.Exact payloads, commands, or snippets shown in Bash commands and expected output for creating a Cloudflare D1 database using Prisma.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle.jsonA JSON configuration file for Wrangler defining the Cloudflare D1 database binding and project settings for a Prisma deployment.Exact payloads, commands, or snippets shown in A JSON configuration file for Wrangler defining the Cloudflare D1 database binding and project settings for a Prisma...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym.textA text snippet showing the DATABASE_URL environment variable configuration for deploying Prisma with Cloudflare D1.Exact payloads, commands, or snippets shown in A text snippet showing the DATABASEURL environment variable configuration for deploying Prisma with Cloudflare D1.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-typescr.typescriptA TypeScript configuration file demonstrating how to set up Prisma for deployment on Cloudflare D1.Exact payloads, commands, or snippets shown in A TypeScript configuration file demonstrating how to set up Prisma for deployment on Cloudflare D1.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-4.bashBash commands to create the necessary directory structure for Prisma Cloudflare D1 migrations.Exact payloads, commands, or snippets shown in Bash commands to create the necessary directory structure for Prisma Cloudflare D1 migrations.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate.bashA bash command using npx prisma migrate diff to generate a SQL migration script for Cloudflare D1 from a Prisma schema.Exact payloads, commands, or snippets shown in A bash command using npx prisma migrate diff to generate a SQL migration script for Cloudflare D1 from a Prisma schema.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrati.bashA bash command using pnpm to generate a SQL migration script by comparing an empty state to the current Prisma schema for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command using pnpm to generate a SQL migration script by comparing an empty state to the current Prisma schema...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate-2.bashA bash command using yarn dlx prisma migrate diff to generate a SQL migration script from an empty state to a schema for Cloudflare D1.Exact payloads, commands, or snippets shown in A bash command using yarn dlx prisma migrate diff to generate a SQL migration script from an empty state to a schema...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate-3.bashA bash command using bunx to generate a SQL migration script by comparing an empty state to the current Prisma schema for Cloudflare D1.Exact payloads, commands, or snippets shown in A bash command using bunx to generate a SQL migration script by comparing an empty state to the current Prisma schema...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-5.bashBash commands to apply Prisma migrations to local and remote Cloudflare D1 databases using the Wrangler CLI.Exact payloads, commands, or snippets shown in Bash commands to apply Prisma migrations to local and remote Cloudflare D1 databases using the Wrangler CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-6.bashBash commands for applying Prisma migrations to local and remote Cloudflare D1 databases using the Wrangler CLI.Exact payloads, commands, or snippets shown in Bash commands for applying Prisma migrations to local and remote Cloudflare D1 databases using the Wrangler CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-7.bashBash commands to apply Prisma migrations to local and remote Cloudflare D1 databases using the Wrangler CLI.Exact payloads, commands, or snippets shown in Bash commands to apply Prisma migrations to local and remote Cloudflare D1 databases using the Wrangler CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-8.bashBash commands to apply Prisma migrations to local and remote Cloudflare D1 databases using Wrangler.Exact payloads, commands, or snippets shown in Bash commands to apply Prisma migrations to local and remote Cloudflare D1 databases using Wrangler.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-9.bashBash commands for executing SQL insert statements on local and remote Cloudflare D1 databases using the Wrangler CLI.Exact payloads, commands, or snippets shown in Bash commands for executing SQL insert statements on local and remote Cloudflare D1 databases using the Wrangler CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-10.bashBash commands using Wrangler D1 to execute SQL insert statements for both local and remote Cloudflare D1 databases.Exact payloads, commands, or snippets shown in Bash commands using Wrangler D1 to execute SQL insert statements for both local and remote Cloudflare D1 databases.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-11.bashBash commands for executing SQL statements on local and remote Cloudflare D1 databases using the Wrangler CLI.Exact payloads, commands, or snippets shown in Bash commands for executing SQL statements on local and remote Cloudflare D1 databases using the Wrangler CLI.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-wrangle-12.bashBash commands for executing SQL statements on local and remote Cloudflare D1 databases using Wrangler.Exact payloads, commands, or snippets shown in Bash commands for executing SQL statements on local and remote Cloudflare D1 databases using Wrangler.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate-4.bashA bash command demonstrating how to use npx prisma migrate diff to compare a local D1 database with a Prisma schema.Exact payloads, commands, or snippets shown in A bash command demonstrating how to use npx prisma migrate diff to compare a local D1 database with a Prisma schema.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate-5.bashA bash command using pnpm to generate a SQL migration script by comparing a local D1 database with the Prisma schema.Exact payloads, commands, or snippets shown in A bash command using pnpm to generate a SQL migration script by comparing a local D1 database with the Prisma schema.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate-6.bashA bash command using yarn dlx prisma migrate diff to generate a migration script from a local D1 database to a Prisma schema.Exact payloads, commands, or snippets shown in A bash command using yarn dlx prisma migrate diff to generate a migration script from a local D1 database to a Prisma...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-migrate-7.bashA bash command using bunx to run prisma migrate diff between a local D1 instance and a schema to generate a migration script.Exact payloads, commands, or snippets shown in A bash command using bunx to run prisma migrate diff between a local D1 instance and a schema to generate a migration...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-generat.bashA bash command demonstrating how to use npx prisma generate for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command demonstrating how to use npx prisma generate for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-pnpm-ge.bashA bash command to generate the Prisma client using pnpm dlx for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using pnpm dlx for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-generat-2.bashA bash command using yarn dlx to generate the Prisma client for a Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command using yarn dlx to generate the Prisma client for a Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-bunx-ge.bashA bash command demonstrating how to use bunx to run the prisma generate command for Cloudflare D1 deployment.Exact payloads, commands, or snippets shown in A bash command demonstrating how to use bunx to run the prisma generate command for Cloudflare D1 deployment.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-typescr-2.typescriptA TypeScript example demonstrating how to initialize the PrismaClient using the PrismaD1 adapter within a Cloudflare Workers fetch handler.Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to initialize the PrismaClient using the PrismaD1 adapter within a Cloudflare...
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-5.bashA bash command used to run the development server for a Prisma project deployed on Cloudflare D1.Exact payloads, commands, or snippets shown in A bash command used to run the development server for a Prisma project deployed on Cloudflare D1.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-6.bashA bash command to run the development server for a Prisma project deployed on Cloudflare D1 using pnpm.Exact payloads, commands, or snippets shown in A bash command to run the development server for a Prisma project deployed on Cloudflare D1 using pnpm.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-7.bashA bash command used to run the development server for a Prisma project deployed on Cloudflare D1.Exact payloads, commands, or snippets shown in A bash command used to run the development server for a Prisma project deployed on Cloudflare D1.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-bun-dev.bashA bash command used to run the development server for a Prisma Cloudflare D1 deployment using Bun.Exact payloads, commands, or snippets shown in A bash command used to run the development server for a Prisma Cloudflare D1 deployment using Bun.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-js-seed.jsA JavaScript code snippet demonstrating how to seed data into a Cloudflare D1 database using Prisma.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to seed data into a Cloudflare D1 database using Prisma.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-8.bashA bash command used to deploy Prisma to Cloudflare D1 using npm.Exact payloads, commands, or snippets shown in A bash command used to deploy Prisma to Cloudflare D1 using npm.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-9.bashA bash command used to deploy Prisma to Cloudflare D1 using pnpm.Exact payloads, commands, or snippets shown in A bash command used to deploy Prisma to Cloudflare D1 using pnpm.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-10.bashA bash command demonstrating how to deploy Prisma to Cloudflare D1 using yarn.Exact payloads, commands, or snippets shown in A bash command demonstrating how to deploy Prisma to Cloudflare D1 using yarn.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-deploym-11.bashA bash command used to deploy Prisma to Cloudflare D1 using the bun runtime.Exact payloads, commands, or snippets shown in A bash command used to deploy Prisma to Cloudflare D1 using the bun runtime.
examples/prisma-cloudflare-d1-docs-guides-deployment-prisma-cloudflare-d1-js-seed-2.jsA JavaScript code snippet demonstrating how to seed data into a Cloudflare D1 database using Prisma.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to seed data into a Cloudflare D1 database using Prisma.

What This Skill Covers

  • Cloudflare D1 (/docs/guides/deployment/cloudflare-d1)
  • Main sections: npm, pnpm, yarn, bun, npm.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://www.prisma.io/docs/guides/deployment/cloudflare-d1