[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-prisma-prisma-postgres-setup":3,"mdc-u6qu7i-key":34,"related-org-prisma-prisma-postgres-setup":2763,"related-repo-prisma-prisma-postgres-setup":2934},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"prisma-postgres-setup","set up Prisma Postgres databases","Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to \"set up a database\", \"create a Prisma Postgres project\", \"get a connection string\", \"connect my app to Prisma Postgres\", or \"provision a database\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"prisma","Prisma","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fprisma.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Local Development","local-development","tag",{"name":17,"slug":18,"type":15},"Database","database",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"PostgreSQL","postgresql",44,"https:\u002F\u002Fgithub.com\u002Fprisma\u002Fskills","2026-04-06T18:48:32.938377","MIT",3,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],null,"https:\u002F\u002Fgithub.com\u002Fprisma\u002Fskills\u002Ftree\u002FHEAD\u002Fprisma-postgres-setup","---\nname: prisma-postgres-setup\ndescription: Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to \"set up a database\", \"create a Prisma Postgres project\", \"get a connection string\", \"connect my app to Prisma Postgres\", or \"provision a database\".\nlicense: MIT\nmetadata:\n  author: prisma\n  version: \"1.1.0\"\n---\n\n# Prisma Postgres Setup\n\nProcedural skill that guides you through provisioning a new Prisma Postgres database via the Management API and connecting it to a local project.\n\n## When to Apply\n\nUse this skill when:\n\n- Setting up a new Prisma Postgres database for a project\n- Creating a Prisma Postgres project and connecting it locally\n- Obtaining a connection string for Prisma Postgres\n- Provisioning a database via the Management API (not the Console UI)\n\nDo **not** use this skill when:\n\n- Setting up CI\u002FCD preview databases — use `prisma-postgres-cicd`\n- Building multi-tenant database provisioning into an app — use `prisma-postgres-integrator`\n- Working with a database that already exists and is connected (schema\u002Fmigration tasks are standard Prisma CLI)\n\n## Prerequisites\n\n- Node.js 18+\n- A Prisma Postgres workspace (create one at https:\u002F\u002Fconsole.prisma.io if needed)\n- A workspace service token (see `references\u002Fauth.md`)\n\n## UX Guidelines\n\nWhen presenting choices to the user (region selection, project deletion, etc.), **use your platform's interactive selection mechanism** (e.g., `ask` tool in Claude Code, structured prompts in other agents). Do not print static tables and ask the user to type a value — present selectable options so the user can pick with minimal effort.\n\n## Workflow\n\nFollow these steps in order. Each step includes the API call to make and how to handle the response.\n\n### Step 1: Authenticate\n\nYou need a service token. Try these methods in order:\n\n**1a. Token in the user's prompt**\n\nCheck if the user included a service token in their initial message (e.g., \"Set up Prisma Postgres with token eyJ...\"). If so, use it **exactly as provided** — do not truncate, re-encode, or round-trip it through a file. Store it in a shell variable for subsequent calls.\n\n**1b. Token in the environment**\n\nCheck for `PRISMA_SERVICE_TOKEN` in the environment or `.env` file.\n\n**1c. Ask the user to create one**\n\nIf no token is available, instruct the user:\n\n> Create a service token in Prisma Console → Workspace Settings → Service Tokens.\n> Copy the token and paste it here.\n\nRead `references\u002Fauth.md` for details on service token creation.\n\nOnce you have a token, store it in a shell variable (`PRISMA_SERVICE_TOKEN`) and use it for all subsequent API calls.\n\n### Step 2: List available regions\n\nFetch the list of available Prisma Postgres regions to let the user choose where to deploy.\n\n```bash\ncurl -s -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fregions\u002Fpostgres\n```\n\nThe response contains an array of regions with `id`, `name`, and `status`. Only present regions where `status` is `available`.\n\n**Present the regions as an interactive menu** — let the user pick from options rather than typing a region ID manually.\n\nRead `references\u002Fendpoints.md` for the full response shape.\n\n### Step 3: Create a project with a database\n\n```bash\ncurl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fprojects \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"\u003Cproject-name>\",\n    \"region\": \"\u003Cregion-id>\",\n    \"createDatabase\": true\n  }'\n```\n\nUse the current directory name as the project name by default.\n\nThe response is wrapped in `{ \"data\": { ... } }`. Extract:\n\n- `data.id` — the project ID (prefixed with `proj_`)\n- `data.database.id` — the database ID (prefixed with `db_`)\n- `data.database.connections[0].endpoints.direct.connectionString` — the direct PostgreSQL connection string\n\nUse the **direct** connection string (`endpoints.direct.connectionString`). Do not use the pooled or accelerate endpoints — those are for legacy Accelerate setups and not needed for new projects.\n\nIf the response status is `provisioning`, wait a few seconds and poll `GET \u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>` until `status` is `ready`.\n\n**If creation fails due to a database limit**, list the user's existing projects and present them as an interactive menu for deletion. After the user picks one, delete it and retry.\n\nRead `references\u002Fendpoints.md` for the full request\u002Fresponse shapes.\n\n### Step 4: Create a named connection (optional)\n\nIf you need a dedicated connection (e.g., per-developer or per-environment), create one:\n\n```bash\ncurl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>\u002Fconnections \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"name\": \"dev\" }'\n```\n\nExtract the direct connection string from `data.endpoints.direct.connectionString`.\n\n### Step 5: Configure the local project\n\n1. Install dependencies:\n\n```bash\nnpm install prisma @prisma\u002Fclient @prisma\u002Fadapter-pg pg dotenv\n```\n\nAll five packages are required:\n- `prisma` — CLI for migrations, schema push, client generation\n- `@prisma\u002Fclient` — the generated query client\n- `@prisma\u002Fadapter-pg` — Prisma 7 driver adapter for direct PostgreSQL connections\n- `pg` — Node.js PostgreSQL driver (used by the adapter)\n- `dotenv` — loads `.env` variables for `prisma.config.ts`\n\n2. Write the direct connection string to `.env`. **Append** to the file if it already exists — do not overwrite existing entries:\n\n```\nDATABASE_URL=\"\u003Cdirect-connection-string>\"\n```\n\n3. Verify `.gitignore` includes `.env`. Create `.gitignore` if it does not exist. Warn the user if `.env` is not gitignored.\n\n4. Ensure `package.json` has `\"type\": \"module\"` set (Prisma 7 generates ESM output).\n\n5. If `prisma\u002Fschema.prisma` does not exist, run `npx prisma init` to scaffold the project. This creates both `prisma\u002Fschema.prisma` and `prisma.config.ts`.\n\n6. Ensure `schema.prisma` has the `postgresql` provider and **no** `url` or `directUrl` in the datasource block (Prisma 7 manages connection URLs in `prisma.config.ts`, not in the schema):\n\n```prisma\ndatasource db {\n  provider = \"postgresql\"\n}\n```\n\n7. Ensure `prisma.config.ts` loads the connection URL from the environment:\n\n```typescript\nimport path from 'node:path'\nimport { defineConfig } from 'prisma\u002Fconfig'\nimport 'dotenv\u002Fconfig'\n\nexport default defineConfig({\n  earlyAccess: true,\n  schema: path.join(import.meta.dirname, 'prisma', 'schema.prisma'),\n  datasource: {\n    url: process.env.DATABASE_URL!,\n  },\n})\n```\n\n**Important Prisma 7 notes:**\n- Connection URLs go in `prisma.config.ts`, never in `schema.prisma`\n- The provider in `schema.prisma` must be `\"postgresql\"` (not `\"prismaPostgres\"`)\n- `dotenv\u002Fconfig` must be imported in `prisma.config.ts` to load `.env` variables\n\n### Step 6: Define schema and push\n\nIf the schema already has models, skip to pushing. Otherwise, **present these options as an interactive menu**:\n\n1. **\"I'll define my schema manually\"** — Tell the user to edit `prisma\u002Fschema.prisma` and come back when ready. Wait for them before proceeding.\n2. **\"Give me a starter schema\"** — Add a Blog starter schema (User, Post, Comment with relations) to `prisma\u002Fschema.prisma`. Show the user what was added and ask if they want to adjust it before pushing.\n3. **\"I'll describe what I need\"** — Ask the user to describe their data model in natural language (e.g., \"I'm building a task manager with projects, tasks, and team members\"). Generate a schema from the description, show it, and ask for confirmation before pushing.\n\nOnce the schema has models and the user is ready, create a migration and generate the client:\n\n```bash\nnpx prisma migrate dev --name init\n```\n\nThis creates migration files in `prisma\u002Fmigrations\u002F` **and** generates the client in one step. Migration history is essential for CI\u002FCD workflows (`prisma migrate deploy`) and production deployments.\n\nOnly use `npx prisma db push` if the user explicitly asks for prototyping-only mode (no migration history). In that case, follow it with `npx prisma generate`.\n\n### Step 7: Verify the connection\n\nAfter generating the client, create and run a quick verification script to confirm everything works end-to-end. This is **critical** — do not skip this step.\n\nCreate a file named `test-connection.ts`:\n\n```typescript\nimport 'dotenv\u002Fconfig'\nimport pg from 'pg'\nimport { PrismaPg } from '@prisma\u002Fadapter-pg'\nimport { PrismaClient } from '.\u002Fgenerated\u002Fprisma\u002Fclient.js'\n\nconst pool = new pg.Pool({ connectionString: process.env.DATABASE_URL })\nconst adapter = new PrismaPg(pool)\nconst prisma = new PrismaClient({ adapter })\n\nconst result = await prisma.$queryRawUnsafe('SELECT 1 as connected')\nconsole.log('Connected to Prisma Postgres:', result)\n\nawait prisma.$disconnect()\nawait pool.end()\n```\n\nRun it:\n\n```bash\nnpx tsx test-connection.ts\n```\n\n**Prisma 7 client instantiation rules:**\n- Import from `.\u002Fgenerated\u002Fprisma\u002Fclient.js` (not `.\u002Fgenerated\u002Fprisma`)\n- Create a `pg.Pool` with the `DATABASE_URL` connection string\n- Wrap it in a `PrismaPg` adapter\n- Pass `{ adapter }` to the `PrismaClient` constructor\n- Do **not** use `datasourceUrl` — that option does not exist in Prisma 7\n- Do **not** use `new PrismaClient()` with no arguments — it will throw\n\nAfter verification succeeds, delete `test-connection.ts`.\n\nThen share links for the user to explore their database:\n\n- **Prisma Studio (CLI):** `npx prisma studio` — opens a visual data browser locally\n- **Console:** `https:\u002F\u002Fconsole.prisma.io\u002F\u003CworkspaceId>\u002F\u003CprojectId>\u002F\u003CdatabaseId>\u002Fdashboard` — strip the prefixes (`wksp_`, `proj_`, `db_`) from the IDs returned in Step 3 to build this URL\n\nRead `references\u002Fprisma7-client.md` for the full client instantiation reference.\n\n## Error Handling\n\nRead `references\u002Fapi-basics.md` for the full error reference. Key self-correction patterns:\n\n| HTTP Status | Error Code | Action |\n|---|---|---|\n| 401 | `authentication-failed` | Service token is invalid or expired. Ask the user to create a new one in Console → Workspace Settings → Service Tokens. |\n| 404 | `resource-not-found` | Check that the resource ID includes the correct prefix (`proj_`, `db_`, `con_`). |\n| 422 | `validation-error` | Check request body against the endpoint schema. Common: missing `name`, invalid `region`. |\n| 429 | `rate-limit-exceeded` | Back off and retry after a few seconds. |\n\n## Reference Files\n\nDetailed API and usage information is in:\n\n```\nreferences\u002Fauth.md             — Service token creation and usage\nreferences\u002Fapi-basics.md       — Base URL, envelope, IDs, errors, pagination\nreferences\u002Fendpoints.md        — Endpoint details for projects, databases, connections, regions\nreferences\u002Fprisma7-client.md   — Prisma 7 client instantiation and usage patterns\n```\n",{"data":35,"body":38},{"name":4,"description":6,"license":26,"metadata":36},{"author":8,"version":37},"1.1.0",{"type":39,"children":40},"root",[41,49,55,62,67,92,105,136,142,178,184,204,210,215,222,227,235,247,255,276,284,289,298,310,322,328,333,403,447,457,469,475,624,629,642,692,712,746,756,767,773,778,908,920,926,935,980,985,1055,1077,1087,1228,1260,1274,1611,1619,1690,1696,1707,1754,1759,1798,1825,1845,1851,1863,1875,2332,2337,2361,2369,2479,2490,2495,2552,2564,2570,2582,2737,2743,2748,2757],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":48},"text","Prisma Postgres Setup",{"type":42,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"Procedural skill that guides you through provisioning a new Prisma Postgres database via the Management API and connecting it to a local project.",{"type":42,"tag":56,"props":57,"children":59},"h2",{"id":58},"when-to-apply",[60],{"type":47,"value":61},"When to Apply",{"type":42,"tag":50,"props":63,"children":64},{},[65],{"type":47,"value":66},"Use this skill when:",{"type":42,"tag":68,"props":69,"children":70},"ul",{},[71,77,82,87],{"type":42,"tag":72,"props":73,"children":74},"li",{},[75],{"type":47,"value":76},"Setting up a new Prisma Postgres database for a project",{"type":42,"tag":72,"props":78,"children":79},{},[80],{"type":47,"value":81},"Creating a Prisma Postgres project and connecting it locally",{"type":42,"tag":72,"props":83,"children":84},{},[85],{"type":47,"value":86},"Obtaining a connection string for Prisma Postgres",{"type":42,"tag":72,"props":88,"children":89},{},[90],{"type":47,"value":91},"Provisioning a database via the Management API (not the Console UI)",{"type":42,"tag":50,"props":93,"children":94},{},[95,97,103],{"type":47,"value":96},"Do ",{"type":42,"tag":98,"props":99,"children":100},"strong",{},[101],{"type":47,"value":102},"not",{"type":47,"value":104}," use this skill when:",{"type":42,"tag":68,"props":106,"children":107},{},[108,120,131],{"type":42,"tag":72,"props":109,"children":110},{},[111,113],{"type":47,"value":112},"Setting up CI\u002FCD preview databases — use ",{"type":42,"tag":114,"props":115,"children":117},"code",{"className":116},[],[118],{"type":47,"value":119},"prisma-postgres-cicd",{"type":42,"tag":72,"props":121,"children":122},{},[123,125],{"type":47,"value":124},"Building multi-tenant database provisioning into an app — use ",{"type":42,"tag":114,"props":126,"children":128},{"className":127},[],[129],{"type":47,"value":130},"prisma-postgres-integrator",{"type":42,"tag":72,"props":132,"children":133},{},[134],{"type":47,"value":135},"Working with a database that already exists and is connected (schema\u002Fmigration tasks are standard Prisma CLI)",{"type":42,"tag":56,"props":137,"children":139},{"id":138},"prerequisites",[140],{"type":47,"value":141},"Prerequisites",{"type":42,"tag":68,"props":143,"children":144},{},[145,150,165],{"type":42,"tag":72,"props":146,"children":147},{},[148],{"type":47,"value":149},"Node.js 18+",{"type":42,"tag":72,"props":151,"children":152},{},[153,155,163],{"type":47,"value":154},"A Prisma Postgres workspace (create one at ",{"type":42,"tag":156,"props":157,"children":161},"a",{"href":158,"rel":159},"https:\u002F\u002Fconsole.prisma.io",[160],"nofollow",[162],{"type":47,"value":158},{"type":47,"value":164}," if needed)",{"type":42,"tag":72,"props":166,"children":167},{},[168,170,176],{"type":47,"value":169},"A workspace service token (see ",{"type":42,"tag":114,"props":171,"children":173},{"className":172},[],[174],{"type":47,"value":175},"references\u002Fauth.md",{"type":47,"value":177},")",{"type":42,"tag":56,"props":179,"children":181},{"id":180},"ux-guidelines",[182],{"type":47,"value":183},"UX Guidelines",{"type":42,"tag":50,"props":185,"children":186},{},[187,189,194,196,202],{"type":47,"value":188},"When presenting choices to the user (region selection, project deletion, etc.), ",{"type":42,"tag":98,"props":190,"children":191},{},[192],{"type":47,"value":193},"use your platform's interactive selection mechanism",{"type":47,"value":195}," (e.g., ",{"type":42,"tag":114,"props":197,"children":199},{"className":198},[],[200],{"type":47,"value":201},"ask",{"type":47,"value":203}," tool in Claude Code, structured prompts in other agents). Do not print static tables and ask the user to type a value — present selectable options so the user can pick with minimal effort.",{"type":42,"tag":56,"props":205,"children":207},{"id":206},"workflow",[208],{"type":47,"value":209},"Workflow",{"type":42,"tag":50,"props":211,"children":212},{},[213],{"type":47,"value":214},"Follow these steps in order. Each step includes the API call to make and how to handle the response.",{"type":42,"tag":216,"props":217,"children":219},"h3",{"id":218},"step-1-authenticate",[220],{"type":47,"value":221},"Step 1: Authenticate",{"type":42,"tag":50,"props":223,"children":224},{},[225],{"type":47,"value":226},"You need a service token. Try these methods in order:",{"type":42,"tag":50,"props":228,"children":229},{},[230],{"type":42,"tag":98,"props":231,"children":232},{},[233],{"type":47,"value":234},"1a. Token in the user's prompt",{"type":42,"tag":50,"props":236,"children":237},{},[238,240,245],{"type":47,"value":239},"Check if the user included a service token in their initial message (e.g., \"Set up Prisma Postgres with token eyJ...\"). If so, use it ",{"type":42,"tag":98,"props":241,"children":242},{},[243],{"type":47,"value":244},"exactly as provided",{"type":47,"value":246}," — do not truncate, re-encode, or round-trip it through a file. Store it in a shell variable for subsequent calls.",{"type":42,"tag":50,"props":248,"children":249},{},[250],{"type":42,"tag":98,"props":251,"children":252},{},[253],{"type":47,"value":254},"1b. Token in the environment",{"type":42,"tag":50,"props":256,"children":257},{},[258,260,266,268,274],{"type":47,"value":259},"Check for ",{"type":42,"tag":114,"props":261,"children":263},{"className":262},[],[264],{"type":47,"value":265},"PRISMA_SERVICE_TOKEN",{"type":47,"value":267}," in the environment or ",{"type":42,"tag":114,"props":269,"children":271},{"className":270},[],[272],{"type":47,"value":273},".env",{"type":47,"value":275}," file.",{"type":42,"tag":50,"props":277,"children":278},{},[279],{"type":42,"tag":98,"props":280,"children":281},{},[282],{"type":47,"value":283},"1c. Ask the user to create one",{"type":42,"tag":50,"props":285,"children":286},{},[287],{"type":47,"value":288},"If no token is available, instruct the user:",{"type":42,"tag":290,"props":291,"children":292},"blockquote",{},[293],{"type":42,"tag":50,"props":294,"children":295},{},[296],{"type":47,"value":297},"Create a service token in Prisma Console → Workspace Settings → Service Tokens.\nCopy the token and paste it here.",{"type":42,"tag":50,"props":299,"children":300},{},[301,303,308],{"type":47,"value":302},"Read ",{"type":42,"tag":114,"props":304,"children":306},{"className":305},[],[307],{"type":47,"value":175},{"type":47,"value":309}," for details on service token creation.",{"type":42,"tag":50,"props":311,"children":312},{},[313,315,320],{"type":47,"value":314},"Once you have a token, store it in a shell variable (",{"type":42,"tag":114,"props":316,"children":318},{"className":317},[],[319],{"type":47,"value":265},{"type":47,"value":321},") and use it for all subsequent API calls.",{"type":42,"tag":216,"props":323,"children":325},{"id":324},"step-2-list-available-regions",[326],{"type":47,"value":327},"Step 2: List available regions",{"type":42,"tag":50,"props":329,"children":330},{},[331],{"type":47,"value":332},"Fetch the list of available Prisma Postgres regions to let the user choose where to deploy.",{"type":42,"tag":334,"props":335,"children":340},"pre",{"className":336,"code":337,"language":338,"meta":339,"style":339},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -s -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fregions\u002Fpostgres\n","bash","",[341],{"type":42,"tag":114,"props":342,"children":343},{"__ignoreMap":339},[344,394],{"type":42,"tag":345,"props":346,"children":349},"span",{"class":347,"line":348},"line",1,[350,356,362,367,373,378,384,389],{"type":42,"tag":345,"props":351,"children":353},{"style":352},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[354],{"type":47,"value":355},"curl",{"type":42,"tag":345,"props":357,"children":359},{"style":358},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[360],{"type":47,"value":361}," -s",{"type":42,"tag":345,"props":363,"children":364},{"style":358},[365],{"type":47,"value":366}," -H",{"type":42,"tag":345,"props":368,"children":370},{"style":369},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[371],{"type":47,"value":372}," \"",{"type":42,"tag":345,"props":374,"children":375},{"style":358},[376],{"type":47,"value":377},"Authorization: Bearer ",{"type":42,"tag":345,"props":379,"children":381},{"style":380},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[382],{"type":47,"value":383},"$PRISMA_SERVICE_TOKEN",{"type":42,"tag":345,"props":385,"children":386},{"style":369},[387],{"type":47,"value":388},"\"",{"type":42,"tag":345,"props":390,"children":391},{"style":380},[392],{"type":47,"value":393}," \\\n",{"type":42,"tag":345,"props":395,"children":397},{"class":347,"line":396},2,[398],{"type":42,"tag":345,"props":399,"children":400},{"style":358},[401],{"type":47,"value":402},"  https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fregions\u002Fpostgres\n",{"type":42,"tag":50,"props":404,"children":405},{},[406,408,414,416,422,424,430,432,437,439,445],{"type":47,"value":407},"The response contains an array of regions with ",{"type":42,"tag":114,"props":409,"children":411},{"className":410},[],[412],{"type":47,"value":413},"id",{"type":47,"value":415},", ",{"type":42,"tag":114,"props":417,"children":419},{"className":418},[],[420],{"type":47,"value":421},"name",{"type":47,"value":423},", and ",{"type":42,"tag":114,"props":425,"children":427},{"className":426},[],[428],{"type":47,"value":429},"status",{"type":47,"value":431},". Only present regions where ",{"type":42,"tag":114,"props":433,"children":435},{"className":434},[],[436],{"type":47,"value":429},{"type":47,"value":438}," is ",{"type":42,"tag":114,"props":440,"children":442},{"className":441},[],[443],{"type":47,"value":444},"available",{"type":47,"value":446},".",{"type":42,"tag":50,"props":448,"children":449},{},[450,455],{"type":42,"tag":98,"props":451,"children":452},{},[453],{"type":47,"value":454},"Present the regions as an interactive menu",{"type":47,"value":456}," — let the user pick from options rather than typing a region ID manually.",{"type":42,"tag":50,"props":458,"children":459},{},[460,461,467],{"type":47,"value":302},{"type":42,"tag":114,"props":462,"children":464},{"className":463},[],[465],{"type":47,"value":466},"references\u002Fendpoints.md",{"type":47,"value":468}," for the full response shape.",{"type":42,"tag":216,"props":470,"children":472},{"id":471},"step-3-create-a-project-with-a-database",[473],{"type":47,"value":474},"Step 3: Create a project with a database",{"type":42,"tag":334,"props":476,"children":478},{"className":336,"code":477,"language":338,"meta":339,"style":339},"curl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fprojects \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"\u003Cproject-name>\",\n    \"region\": \"\u003Cregion-id>\",\n    \"createDatabase\": true\n  }'\n",[479],{"type":42,"tag":114,"props":480,"children":481},{"__ignoreMap":339},[482,512,540,564,583,592,601,610],{"type":42,"tag":345,"props":483,"children":484},{"class":347,"line":348},[485,489,493,498,503,508],{"type":42,"tag":345,"props":486,"children":487},{"style":352},[488],{"type":47,"value":355},{"type":42,"tag":345,"props":490,"children":491},{"style":358},[492],{"type":47,"value":361},{"type":42,"tag":345,"props":494,"children":495},{"style":358},[496],{"type":47,"value":497}," -X",{"type":42,"tag":345,"props":499,"children":500},{"style":358},[501],{"type":47,"value":502}," POST",{"type":42,"tag":345,"props":504,"children":505},{"style":358},[506],{"type":47,"value":507}," https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fprojects",{"type":42,"tag":345,"props":509,"children":510},{"style":380},[511],{"type":47,"value":393},{"type":42,"tag":345,"props":513,"children":514},{"class":347,"line":396},[515,520,524,528,532,536],{"type":42,"tag":345,"props":516,"children":517},{"style":358},[518],{"type":47,"value":519},"  -H",{"type":42,"tag":345,"props":521,"children":522},{"style":369},[523],{"type":47,"value":372},{"type":42,"tag":345,"props":525,"children":526},{"style":358},[527],{"type":47,"value":377},{"type":42,"tag":345,"props":529,"children":530},{"style":380},[531],{"type":47,"value":383},{"type":42,"tag":345,"props":533,"children":534},{"style":369},[535],{"type":47,"value":388},{"type":42,"tag":345,"props":537,"children":538},{"style":380},[539],{"type":47,"value":393},{"type":42,"tag":345,"props":541,"children":542},{"class":347,"line":27},[543,547,551,556,560],{"type":42,"tag":345,"props":544,"children":545},{"style":358},[546],{"type":47,"value":519},{"type":42,"tag":345,"props":548,"children":549},{"style":369},[550],{"type":47,"value":372},{"type":42,"tag":345,"props":552,"children":553},{"style":358},[554],{"type":47,"value":555},"Content-Type: application\u002Fjson",{"type":42,"tag":345,"props":557,"children":558},{"style":369},[559],{"type":47,"value":388},{"type":42,"tag":345,"props":561,"children":562},{"style":380},[563],{"type":47,"value":393},{"type":42,"tag":345,"props":565,"children":567},{"class":347,"line":566},4,[568,573,578],{"type":42,"tag":345,"props":569,"children":570},{"style":358},[571],{"type":47,"value":572},"  -d",{"type":42,"tag":345,"props":574,"children":575},{"style":369},[576],{"type":47,"value":577}," '",{"type":42,"tag":345,"props":579,"children":580},{"style":358},[581],{"type":47,"value":582},"{\n",{"type":42,"tag":345,"props":584,"children":586},{"class":347,"line":585},5,[587],{"type":42,"tag":345,"props":588,"children":589},{"style":358},[590],{"type":47,"value":591},"    \"name\": \"\u003Cproject-name>\",\n",{"type":42,"tag":345,"props":593,"children":595},{"class":347,"line":594},6,[596],{"type":42,"tag":345,"props":597,"children":598},{"style":358},[599],{"type":47,"value":600},"    \"region\": \"\u003Cregion-id>\",\n",{"type":42,"tag":345,"props":602,"children":604},{"class":347,"line":603},7,[605],{"type":42,"tag":345,"props":606,"children":607},{"style":358},[608],{"type":47,"value":609},"    \"createDatabase\": true\n",{"type":42,"tag":345,"props":611,"children":613},{"class":347,"line":612},8,[614,619],{"type":42,"tag":345,"props":615,"children":616},{"style":358},[617],{"type":47,"value":618},"  }",{"type":42,"tag":345,"props":620,"children":621},{"style":369},[622],{"type":47,"value":623},"'\n",{"type":42,"tag":50,"props":625,"children":626},{},[627],{"type":47,"value":628},"Use the current directory name as the project name by default.",{"type":42,"tag":50,"props":630,"children":631},{},[632,634,640],{"type":47,"value":633},"The response is wrapped in ",{"type":42,"tag":114,"props":635,"children":637},{"className":636},[],[638],{"type":47,"value":639},"{ \"data\": { ... } }",{"type":47,"value":641},". Extract:",{"type":42,"tag":68,"props":643,"children":644},{},[645,663,681],{"type":42,"tag":72,"props":646,"children":647},{},[648,654,656,662],{"type":42,"tag":114,"props":649,"children":651},{"className":650},[],[652],{"type":47,"value":653},"data.id",{"type":47,"value":655}," — the project ID (prefixed with ",{"type":42,"tag":114,"props":657,"children":659},{"className":658},[],[660],{"type":47,"value":661},"proj_",{"type":47,"value":177},{"type":42,"tag":72,"props":664,"children":665},{},[666,672,674,680],{"type":42,"tag":114,"props":667,"children":669},{"className":668},[],[670],{"type":47,"value":671},"data.database.id",{"type":47,"value":673}," — the database ID (prefixed with ",{"type":42,"tag":114,"props":675,"children":677},{"className":676},[],[678],{"type":47,"value":679},"db_",{"type":47,"value":177},{"type":42,"tag":72,"props":682,"children":683},{},[684,690],{"type":42,"tag":114,"props":685,"children":687},{"className":686},[],[688],{"type":47,"value":689},"data.database.connections[0].endpoints.direct.connectionString",{"type":47,"value":691}," — the direct PostgreSQL connection string",{"type":42,"tag":50,"props":693,"children":694},{},[695,697,702,704,710],{"type":47,"value":696},"Use the ",{"type":42,"tag":98,"props":698,"children":699},{},[700],{"type":47,"value":701},"direct",{"type":47,"value":703}," connection string (",{"type":42,"tag":114,"props":705,"children":707},{"className":706},[],[708],{"type":47,"value":709},"endpoints.direct.connectionString",{"type":47,"value":711},"). Do not use the pooled or accelerate endpoints — those are for legacy Accelerate setups and not needed for new projects.",{"type":42,"tag":50,"props":713,"children":714},{},[715,717,723,725,731,733,738,739,745],{"type":47,"value":716},"If the response status is ",{"type":42,"tag":114,"props":718,"children":720},{"className":719},[],[721],{"type":47,"value":722},"provisioning",{"type":47,"value":724},", wait a few seconds and poll ",{"type":42,"tag":114,"props":726,"children":728},{"className":727},[],[729],{"type":47,"value":730},"GET \u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>",{"type":47,"value":732}," until ",{"type":42,"tag":114,"props":734,"children":736},{"className":735},[],[737],{"type":47,"value":429},{"type":47,"value":438},{"type":42,"tag":114,"props":740,"children":742},{"className":741},[],[743],{"type":47,"value":744},"ready",{"type":47,"value":446},{"type":42,"tag":50,"props":747,"children":748},{},[749,754],{"type":42,"tag":98,"props":750,"children":751},{},[752],{"type":47,"value":753},"If creation fails due to a database limit",{"type":47,"value":755},", list the user's existing projects and present them as an interactive menu for deletion. After the user picks one, delete it and retry.",{"type":42,"tag":50,"props":757,"children":758},{},[759,760,765],{"type":47,"value":302},{"type":42,"tag":114,"props":761,"children":763},{"className":762},[],[764],{"type":47,"value":466},{"type":47,"value":766}," for the full request\u002Fresponse shapes.",{"type":42,"tag":216,"props":768,"children":770},{"id":769},"step-4-create-a-named-connection-optional",[771],{"type":47,"value":772},"Step 4: Create a named connection (optional)",{"type":42,"tag":50,"props":774,"children":775},{},[776],{"type":47,"value":777},"If you need a dedicated connection (e.g., per-developer or per-environment), create one:",{"type":42,"tag":334,"props":779,"children":781},{"className":336,"code":780,"language":338,"meta":339,"style":339},"curl -s -X POST https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fdatabases\u002F\u003Cdatabase-id>\u002Fconnections \\\n  -H \"Authorization: Bearer $PRISMA_SERVICE_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"name\": \"dev\" }'\n",[782],{"type":42,"tag":114,"props":783,"children":784},{"__ignoreMap":339},[785,838,865,888],{"type":42,"tag":345,"props":786,"children":787},{"class":347,"line":348},[788,792,796,800,804,809,814,819,824,829,834],{"type":42,"tag":345,"props":789,"children":790},{"style":352},[791],{"type":47,"value":355},{"type":42,"tag":345,"props":793,"children":794},{"style":358},[795],{"type":47,"value":361},{"type":42,"tag":345,"props":797,"children":798},{"style":358},[799],{"type":47,"value":497},{"type":42,"tag":345,"props":801,"children":802},{"style":358},[803],{"type":47,"value":502},{"type":42,"tag":345,"props":805,"children":806},{"style":358},[807],{"type":47,"value":808}," https:\u002F\u002Fapi.prisma.io\u002Fv1\u002Fdatabases\u002F",{"type":42,"tag":345,"props":810,"children":811},{"style":369},[812],{"type":47,"value":813},"\u003C",{"type":42,"tag":345,"props":815,"children":816},{"style":358},[817],{"type":47,"value":818},"database-i",{"type":42,"tag":345,"props":820,"children":821},{"style":380},[822],{"type":47,"value":823},"d",{"type":42,"tag":345,"props":825,"children":826},{"style":369},[827],{"type":47,"value":828},">",{"type":42,"tag":345,"props":830,"children":831},{"style":358},[832],{"type":47,"value":833},"\u002Fconnections",{"type":42,"tag":345,"props":835,"children":836},{"style":380},[837],{"type":47,"value":393},{"type":42,"tag":345,"props":839,"children":840},{"class":347,"line":396},[841,845,849,853,857,861],{"type":42,"tag":345,"props":842,"children":843},{"style":358},[844],{"type":47,"value":519},{"type":42,"tag":345,"props":846,"children":847},{"style":369},[848],{"type":47,"value":372},{"type":42,"tag":345,"props":850,"children":851},{"style":358},[852],{"type":47,"value":377},{"type":42,"tag":345,"props":854,"children":855},{"style":380},[856],{"type":47,"value":383},{"type":42,"tag":345,"props":858,"children":859},{"style":369},[860],{"type":47,"value":388},{"type":42,"tag":345,"props":862,"children":863},{"style":380},[864],{"type":47,"value":393},{"type":42,"tag":345,"props":866,"children":867},{"class":347,"line":27},[868,872,876,880,884],{"type":42,"tag":345,"props":869,"children":870},{"style":358},[871],{"type":47,"value":519},{"type":42,"tag":345,"props":873,"children":874},{"style":369},[875],{"type":47,"value":372},{"type":42,"tag":345,"props":877,"children":878},{"style":358},[879],{"type":47,"value":555},{"type":42,"tag":345,"props":881,"children":882},{"style":369},[883],{"type":47,"value":388},{"type":42,"tag":345,"props":885,"children":886},{"style":380},[887],{"type":47,"value":393},{"type":42,"tag":345,"props":889,"children":890},{"class":347,"line":566},[891,895,899,904],{"type":42,"tag":345,"props":892,"children":893},{"style":358},[894],{"type":47,"value":572},{"type":42,"tag":345,"props":896,"children":897},{"style":369},[898],{"type":47,"value":577},{"type":42,"tag":345,"props":900,"children":901},{"style":358},[902],{"type":47,"value":903},"{ \"name\": \"dev\" }",{"type":42,"tag":345,"props":905,"children":906},{"style":369},[907],{"type":47,"value":623},{"type":42,"tag":50,"props":909,"children":910},{},[911,913,919],{"type":47,"value":912},"Extract the direct connection string from ",{"type":42,"tag":114,"props":914,"children":916},{"className":915},[],[917],{"type":47,"value":918},"data.endpoints.direct.connectionString",{"type":47,"value":446},{"type":42,"tag":216,"props":921,"children":923},{"id":922},"step-5-configure-the-local-project",[924],{"type":47,"value":925},"Step 5: Configure the local project",{"type":42,"tag":927,"props":928,"children":929},"ol",{},[930],{"type":42,"tag":72,"props":931,"children":932},{},[933],{"type":47,"value":934},"Install dependencies:",{"type":42,"tag":334,"props":936,"children":938},{"className":336,"code":937,"language":338,"meta":339,"style":339},"npm install prisma @prisma\u002Fclient @prisma\u002Fadapter-pg pg dotenv\n",[939],{"type":42,"tag":114,"props":940,"children":941},{"__ignoreMap":339},[942],{"type":42,"tag":345,"props":943,"children":944},{"class":347,"line":348},[945,950,955,960,965,970,975],{"type":42,"tag":345,"props":946,"children":947},{"style":352},[948],{"type":47,"value":949},"npm",{"type":42,"tag":345,"props":951,"children":952},{"style":358},[953],{"type":47,"value":954}," install",{"type":42,"tag":345,"props":956,"children":957},{"style":358},[958],{"type":47,"value":959}," prisma",{"type":42,"tag":345,"props":961,"children":962},{"style":358},[963],{"type":47,"value":964}," @prisma\u002Fclient",{"type":42,"tag":345,"props":966,"children":967},{"style":358},[968],{"type":47,"value":969}," @prisma\u002Fadapter-pg",{"type":42,"tag":345,"props":971,"children":972},{"style":358},[973],{"type":47,"value":974}," pg",{"type":42,"tag":345,"props":976,"children":977},{"style":358},[978],{"type":47,"value":979}," dotenv\n",{"type":42,"tag":50,"props":981,"children":982},{},[983],{"type":47,"value":984},"All five packages are required:",{"type":42,"tag":68,"props":986,"children":987},{},[988,998,1009,1020,1031],{"type":42,"tag":72,"props":989,"children":990},{},[991,996],{"type":42,"tag":114,"props":992,"children":994},{"className":993},[],[995],{"type":47,"value":8},{"type":47,"value":997}," — CLI for migrations, schema push, client generation",{"type":42,"tag":72,"props":999,"children":1000},{},[1001,1007],{"type":42,"tag":114,"props":1002,"children":1004},{"className":1003},[],[1005],{"type":47,"value":1006},"@prisma\u002Fclient",{"type":47,"value":1008}," — the generated query client",{"type":42,"tag":72,"props":1010,"children":1011},{},[1012,1018],{"type":42,"tag":114,"props":1013,"children":1015},{"className":1014},[],[1016],{"type":47,"value":1017},"@prisma\u002Fadapter-pg",{"type":47,"value":1019}," — Prisma 7 driver adapter for direct PostgreSQL connections",{"type":42,"tag":72,"props":1021,"children":1022},{},[1023,1029],{"type":42,"tag":114,"props":1024,"children":1026},{"className":1025},[],[1027],{"type":47,"value":1028},"pg",{"type":47,"value":1030}," — Node.js PostgreSQL driver (used by the adapter)",{"type":42,"tag":72,"props":1032,"children":1033},{},[1034,1040,1042,1047,1049],{"type":42,"tag":114,"props":1035,"children":1037},{"className":1036},[],[1038],{"type":47,"value":1039},"dotenv",{"type":47,"value":1041}," — loads ",{"type":42,"tag":114,"props":1043,"children":1045},{"className":1044},[],[1046],{"type":47,"value":273},{"type":47,"value":1048}," variables for ",{"type":42,"tag":114,"props":1050,"children":1052},{"className":1051},[],[1053],{"type":47,"value":1054},"prisma.config.ts",{"type":42,"tag":927,"props":1056,"children":1057},{"start":396},[1058],{"type":42,"tag":72,"props":1059,"children":1060},{},[1061,1063,1068,1070,1075],{"type":47,"value":1062},"Write the direct connection string to ",{"type":42,"tag":114,"props":1064,"children":1066},{"className":1065},[],[1067],{"type":47,"value":273},{"type":47,"value":1069},". ",{"type":42,"tag":98,"props":1071,"children":1072},{},[1073],{"type":47,"value":1074},"Append",{"type":47,"value":1076}," to the file if it already exists — do not overwrite existing entries:",{"type":42,"tag":334,"props":1078,"children":1082},{"className":1079,"code":1081,"language":47},[1080],"language-text","DATABASE_URL=\"\u003Cdirect-connection-string>\"\n",[1083],{"type":42,"tag":114,"props":1084,"children":1085},{"__ignoreMap":339},[1086],{"type":47,"value":1081},{"type":42,"tag":927,"props":1088,"children":1089},{"start":27},[1090,1124,1145,1179],{"type":42,"tag":72,"props":1091,"children":1092},{},[1093,1095,1101,1103,1108,1110,1115,1117,1122],{"type":47,"value":1094},"Verify ",{"type":42,"tag":114,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":47,"value":1100},".gitignore",{"type":47,"value":1102}," includes ",{"type":42,"tag":114,"props":1104,"children":1106},{"className":1105},[],[1107],{"type":47,"value":273},{"type":47,"value":1109},". Create ",{"type":42,"tag":114,"props":1111,"children":1113},{"className":1112},[],[1114],{"type":47,"value":1100},{"type":47,"value":1116}," if it does not exist. Warn the user if ",{"type":42,"tag":114,"props":1118,"children":1120},{"className":1119},[],[1121],{"type":47,"value":273},{"type":47,"value":1123}," is not gitignored.",{"type":42,"tag":72,"props":1125,"children":1126},{},[1127,1129,1135,1137,1143],{"type":47,"value":1128},"Ensure ",{"type":42,"tag":114,"props":1130,"children":1132},{"className":1131},[],[1133],{"type":47,"value":1134},"package.json",{"type":47,"value":1136}," has ",{"type":42,"tag":114,"props":1138,"children":1140},{"className":1139},[],[1141],{"type":47,"value":1142},"\"type\": \"module\"",{"type":47,"value":1144}," set (Prisma 7 generates ESM output).",{"type":42,"tag":72,"props":1146,"children":1147},{},[1148,1150,1156,1158,1164,1166,1171,1173,1178],{"type":47,"value":1149},"If ",{"type":42,"tag":114,"props":1151,"children":1153},{"className":1152},[],[1154],{"type":47,"value":1155},"prisma\u002Fschema.prisma",{"type":47,"value":1157}," does not exist, run ",{"type":42,"tag":114,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":47,"value":1163},"npx prisma init",{"type":47,"value":1165}," to scaffold the project. This creates both ",{"type":42,"tag":114,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":47,"value":1155},{"type":47,"value":1172}," and ",{"type":42,"tag":114,"props":1174,"children":1176},{"className":1175},[],[1177],{"type":47,"value":1054},{"type":47,"value":446},{"type":42,"tag":72,"props":1180,"children":1181},{},[1182,1183,1189,1191,1196,1198,1203,1205,1211,1213,1219,1221,1226],{"type":47,"value":1128},{"type":42,"tag":114,"props":1184,"children":1186},{"className":1185},[],[1187],{"type":47,"value":1188},"schema.prisma",{"type":47,"value":1190}," has the ",{"type":42,"tag":114,"props":1192,"children":1194},{"className":1193},[],[1195],{"type":47,"value":22},{"type":47,"value":1197}," provider and ",{"type":42,"tag":98,"props":1199,"children":1200},{},[1201],{"type":47,"value":1202},"no",{"type":47,"value":1204}," ",{"type":42,"tag":114,"props":1206,"children":1208},{"className":1207},[],[1209],{"type":47,"value":1210},"url",{"type":47,"value":1212}," or ",{"type":42,"tag":114,"props":1214,"children":1216},{"className":1215},[],[1217],{"type":47,"value":1218},"directUrl",{"type":47,"value":1220}," in the datasource block (Prisma 7 manages connection URLs in ",{"type":42,"tag":114,"props":1222,"children":1224},{"className":1223},[],[1225],{"type":47,"value":1054},{"type":47,"value":1227},", not in the schema):",{"type":42,"tag":334,"props":1229,"children":1232},{"className":1230,"code":1231,"language":8,"meta":339,"style":339},"language-prisma shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","datasource db {\n  provider = \"postgresql\"\n}\n",[1233],{"type":42,"tag":114,"props":1234,"children":1235},{"__ignoreMap":339},[1236,1244,1252],{"type":42,"tag":345,"props":1237,"children":1238},{"class":347,"line":348},[1239],{"type":42,"tag":345,"props":1240,"children":1241},{},[1242],{"type":47,"value":1243},"datasource db {\n",{"type":42,"tag":345,"props":1245,"children":1246},{"class":347,"line":396},[1247],{"type":42,"tag":345,"props":1248,"children":1249},{},[1250],{"type":47,"value":1251},"  provider = \"postgresql\"\n",{"type":42,"tag":345,"props":1253,"children":1254},{"class":347,"line":27},[1255],{"type":42,"tag":345,"props":1256,"children":1257},{},[1258],{"type":47,"value":1259},"}\n",{"type":42,"tag":927,"props":1261,"children":1262},{"start":603},[1263],{"type":42,"tag":72,"props":1264,"children":1265},{},[1266,1267,1272],{"type":47,"value":1128},{"type":42,"tag":114,"props":1268,"children":1270},{"className":1269},[],[1271],{"type":47,"value":1054},{"type":47,"value":1273}," loads the connection URL from the environment:",{"type":42,"tag":334,"props":1275,"children":1279},{"className":1276,"code":1277,"language":1278,"meta":339,"style":339},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import path from 'node:path'\nimport { defineConfig } from 'prisma\u002Fconfig'\nimport 'dotenv\u002Fconfig'\n\nexport default defineConfig({\n  earlyAccess: true,\n  schema: path.join(import.meta.dirname, 'prisma', 'schema.prisma'),\n  datasource: {\n    url: process.env.DATABASE_URL!,\n  },\n})\n","typescript",[1280],{"type":42,"tag":114,"props":1281,"children":1282},{"__ignoreMap":339},[1283,1315,1355,1375,1384,1411,1436,1530,1547,1588,1597],{"type":42,"tag":345,"props":1284,"children":1285},{"class":347,"line":348},[1286,1292,1297,1302,1306,1311],{"type":42,"tag":345,"props":1287,"children":1289},{"style":1288},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1290],{"type":47,"value":1291},"import",{"type":42,"tag":345,"props":1293,"children":1294},{"style":380},[1295],{"type":47,"value":1296}," path ",{"type":42,"tag":345,"props":1298,"children":1299},{"style":1288},[1300],{"type":47,"value":1301},"from",{"type":42,"tag":345,"props":1303,"children":1304},{"style":369},[1305],{"type":47,"value":577},{"type":42,"tag":345,"props":1307,"children":1308},{"style":358},[1309],{"type":47,"value":1310},"node:path",{"type":42,"tag":345,"props":1312,"children":1313},{"style":369},[1314],{"type":47,"value":623},{"type":42,"tag":345,"props":1316,"children":1317},{"class":347,"line":396},[1318,1322,1327,1332,1337,1342,1346,1351],{"type":42,"tag":345,"props":1319,"children":1320},{"style":1288},[1321],{"type":47,"value":1291},{"type":42,"tag":345,"props":1323,"children":1324},{"style":369},[1325],{"type":47,"value":1326}," {",{"type":42,"tag":345,"props":1328,"children":1329},{"style":380},[1330],{"type":47,"value":1331}," defineConfig",{"type":42,"tag":345,"props":1333,"children":1334},{"style":369},[1335],{"type":47,"value":1336}," }",{"type":42,"tag":345,"props":1338,"children":1339},{"style":1288},[1340],{"type":47,"value":1341}," from",{"type":42,"tag":345,"props":1343,"children":1344},{"style":369},[1345],{"type":47,"value":577},{"type":42,"tag":345,"props":1347,"children":1348},{"style":358},[1349],{"type":47,"value":1350},"prisma\u002Fconfig",{"type":42,"tag":345,"props":1352,"children":1353},{"style":369},[1354],{"type":47,"value":623},{"type":42,"tag":345,"props":1356,"children":1357},{"class":347,"line":27},[1358,1362,1366,1371],{"type":42,"tag":345,"props":1359,"children":1360},{"style":1288},[1361],{"type":47,"value":1291},{"type":42,"tag":345,"props":1363,"children":1364},{"style":369},[1365],{"type":47,"value":577},{"type":42,"tag":345,"props":1367,"children":1368},{"style":358},[1369],{"type":47,"value":1370},"dotenv\u002Fconfig",{"type":42,"tag":345,"props":1372,"children":1373},{"style":369},[1374],{"type":47,"value":623},{"type":42,"tag":345,"props":1376,"children":1377},{"class":347,"line":566},[1378],{"type":42,"tag":345,"props":1379,"children":1381},{"emptyLinePlaceholder":1380},true,[1382],{"type":47,"value":1383},"\n",{"type":42,"tag":345,"props":1385,"children":1386},{"class":347,"line":585},[1387,1392,1397,1402,1407],{"type":42,"tag":345,"props":1388,"children":1389},{"style":1288},[1390],{"type":47,"value":1391},"export",{"type":42,"tag":345,"props":1393,"children":1394},{"style":1288},[1395],{"type":47,"value":1396}," default",{"type":42,"tag":345,"props":1398,"children":1400},{"style":1399},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1401],{"type":47,"value":1331},{"type":42,"tag":345,"props":1403,"children":1404},{"style":380},[1405],{"type":47,"value":1406},"(",{"type":42,"tag":345,"props":1408,"children":1409},{"style":369},[1410],{"type":47,"value":582},{"type":42,"tag":345,"props":1412,"children":1413},{"class":347,"line":594},[1414,1420,1425,1431],{"type":42,"tag":345,"props":1415,"children":1417},{"style":1416},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1418],{"type":47,"value":1419},"  earlyAccess",{"type":42,"tag":345,"props":1421,"children":1422},{"style":369},[1423],{"type":47,"value":1424},":",{"type":42,"tag":345,"props":1426,"children":1428},{"style":1427},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1429],{"type":47,"value":1430}," true",{"type":42,"tag":345,"props":1432,"children":1433},{"style":369},[1434],{"type":47,"value":1435},",\n",{"type":42,"tag":345,"props":1437,"children":1438},{"class":347,"line":603},[1439,1444,1448,1453,1457,1462,1466,1470,1474,1479,1483,1488,1493,1497,1501,1506,1510,1514,1518,1522,1526],{"type":42,"tag":345,"props":1440,"children":1441},{"style":1416},[1442],{"type":47,"value":1443},"  schema",{"type":42,"tag":345,"props":1445,"children":1446},{"style":369},[1447],{"type":47,"value":1424},{"type":42,"tag":345,"props":1449,"children":1450},{"style":380},[1451],{"type":47,"value":1452}," path",{"type":42,"tag":345,"props":1454,"children":1455},{"style":369},[1456],{"type":47,"value":446},{"type":42,"tag":345,"props":1458,"children":1459},{"style":1399},[1460],{"type":47,"value":1461},"join",{"type":42,"tag":345,"props":1463,"children":1464},{"style":380},[1465],{"type":47,"value":1406},{"type":42,"tag":345,"props":1467,"children":1468},{"style":1288},[1469],{"type":47,"value":1291},{"type":42,"tag":345,"props":1471,"children":1472},{"style":369},[1473],{"type":47,"value":446},{"type":42,"tag":345,"props":1475,"children":1476},{"style":380},[1477],{"type":47,"value":1478},"meta",{"type":42,"tag":345,"props":1480,"children":1481},{"style":369},[1482],{"type":47,"value":446},{"type":42,"tag":345,"props":1484,"children":1485},{"style":380},[1486],{"type":47,"value":1487},"dirname",{"type":42,"tag":345,"props":1489,"children":1490},{"style":369},[1491],{"type":47,"value":1492},",",{"type":42,"tag":345,"props":1494,"children":1495},{"style":369},[1496],{"type":47,"value":577},{"type":42,"tag":345,"props":1498,"children":1499},{"style":358},[1500],{"type":47,"value":8},{"type":42,"tag":345,"props":1502,"children":1503},{"style":369},[1504],{"type":47,"value":1505},"'",{"type":42,"tag":345,"props":1507,"children":1508},{"style":369},[1509],{"type":47,"value":1492},{"type":42,"tag":345,"props":1511,"children":1512},{"style":369},[1513],{"type":47,"value":577},{"type":42,"tag":345,"props":1515,"children":1516},{"style":358},[1517],{"type":47,"value":1188},{"type":42,"tag":345,"props":1519,"children":1520},{"style":369},[1521],{"type":47,"value":1505},{"type":42,"tag":345,"props":1523,"children":1524},{"style":380},[1525],{"type":47,"value":177},{"type":42,"tag":345,"props":1527,"children":1528},{"style":369},[1529],{"type":47,"value":1435},{"type":42,"tag":345,"props":1531,"children":1532},{"class":347,"line":612},[1533,1538,1542],{"type":42,"tag":345,"props":1534,"children":1535},{"style":1416},[1536],{"type":47,"value":1537},"  datasource",{"type":42,"tag":345,"props":1539,"children":1540},{"style":369},[1541],{"type":47,"value":1424},{"type":42,"tag":345,"props":1543,"children":1544},{"style":369},[1545],{"type":47,"value":1546}," {\n",{"type":42,"tag":345,"props":1548,"children":1550},{"class":347,"line":1549},9,[1551,1556,1560,1565,1569,1574,1578,1583],{"type":42,"tag":345,"props":1552,"children":1553},{"style":1416},[1554],{"type":47,"value":1555},"    url",{"type":42,"tag":345,"props":1557,"children":1558},{"style":369},[1559],{"type":47,"value":1424},{"type":42,"tag":345,"props":1561,"children":1562},{"style":380},[1563],{"type":47,"value":1564}," process",{"type":42,"tag":345,"props":1566,"children":1567},{"style":369},[1568],{"type":47,"value":446},{"type":42,"tag":345,"props":1570,"children":1571},{"style":380},[1572],{"type":47,"value":1573},"env",{"type":42,"tag":345,"props":1575,"children":1576},{"style":369},[1577],{"type":47,"value":446},{"type":42,"tag":345,"props":1579,"children":1580},{"style":380},[1581],{"type":47,"value":1582},"DATABASE_URL",{"type":42,"tag":345,"props":1584,"children":1585},{"style":369},[1586],{"type":47,"value":1587},"!,\n",{"type":42,"tag":345,"props":1589,"children":1591},{"class":347,"line":1590},10,[1592],{"type":42,"tag":345,"props":1593,"children":1594},{"style":369},[1595],{"type":47,"value":1596},"  },\n",{"type":42,"tag":345,"props":1598,"children":1600},{"class":347,"line":1599},11,[1601,1606],{"type":42,"tag":345,"props":1602,"children":1603},{"style":369},[1604],{"type":47,"value":1605},"}",{"type":42,"tag":345,"props":1607,"children":1608},{"style":380},[1609],{"type":47,"value":1610},")\n",{"type":42,"tag":50,"props":1612,"children":1613},{},[1614],{"type":42,"tag":98,"props":1615,"children":1616},{},[1617],{"type":47,"value":1618},"Important Prisma 7 notes:",{"type":42,"tag":68,"props":1620,"children":1621},{},[1622,1639,1666],{"type":42,"tag":72,"props":1623,"children":1624},{},[1625,1627,1632,1634],{"type":47,"value":1626},"Connection URLs go in ",{"type":42,"tag":114,"props":1628,"children":1630},{"className":1629},[],[1631],{"type":47,"value":1054},{"type":47,"value":1633},", never in ",{"type":42,"tag":114,"props":1635,"children":1637},{"className":1636},[],[1638],{"type":47,"value":1188},{"type":42,"tag":72,"props":1640,"children":1641},{},[1642,1644,1649,1651,1657,1659,1665],{"type":47,"value":1643},"The provider in ",{"type":42,"tag":114,"props":1645,"children":1647},{"className":1646},[],[1648],{"type":47,"value":1188},{"type":47,"value":1650}," must be ",{"type":42,"tag":114,"props":1652,"children":1654},{"className":1653},[],[1655],{"type":47,"value":1656},"\"postgresql\"",{"type":47,"value":1658}," (not ",{"type":42,"tag":114,"props":1660,"children":1662},{"className":1661},[],[1663],{"type":47,"value":1664},"\"prismaPostgres\"",{"type":47,"value":177},{"type":42,"tag":72,"props":1667,"children":1668},{},[1669,1674,1676,1681,1683,1688],{"type":42,"tag":114,"props":1670,"children":1672},{"className":1671},[],[1673],{"type":47,"value":1370},{"type":47,"value":1675}," must be imported in ",{"type":42,"tag":114,"props":1677,"children":1679},{"className":1678},[],[1680],{"type":47,"value":1054},{"type":47,"value":1682}," to load ",{"type":42,"tag":114,"props":1684,"children":1686},{"className":1685},[],[1687],{"type":47,"value":273},{"type":47,"value":1689}," variables",{"type":42,"tag":216,"props":1691,"children":1693},{"id":1692},"step-6-define-schema-and-push",[1694],{"type":47,"value":1695},"Step 6: Define schema and push",{"type":42,"tag":50,"props":1697,"children":1698},{},[1699,1701,1706],{"type":47,"value":1700},"If the schema already has models, skip to pushing. Otherwise, ",{"type":42,"tag":98,"props":1702,"children":1703},{},[1704],{"type":47,"value":1705},"present these options as an interactive menu",{"type":47,"value":1424},{"type":42,"tag":927,"props":1708,"children":1709},{},[1710,1727,1744],{"type":42,"tag":72,"props":1711,"children":1712},{},[1713,1718,1720,1725],{"type":42,"tag":98,"props":1714,"children":1715},{},[1716],{"type":47,"value":1717},"\"I'll define my schema manually\"",{"type":47,"value":1719}," — Tell the user to edit ",{"type":42,"tag":114,"props":1721,"children":1723},{"className":1722},[],[1724],{"type":47,"value":1155},{"type":47,"value":1726}," and come back when ready. Wait for them before proceeding.",{"type":42,"tag":72,"props":1728,"children":1729},{},[1730,1735,1737,1742],{"type":42,"tag":98,"props":1731,"children":1732},{},[1733],{"type":47,"value":1734},"\"Give me a starter schema\"",{"type":47,"value":1736}," — Add a Blog starter schema (User, Post, Comment with relations) to ",{"type":42,"tag":114,"props":1738,"children":1740},{"className":1739},[],[1741],{"type":47,"value":1155},{"type":47,"value":1743},". Show the user what was added and ask if they want to adjust it before pushing.",{"type":42,"tag":72,"props":1745,"children":1746},{},[1747,1752],{"type":42,"tag":98,"props":1748,"children":1749},{},[1750],{"type":47,"value":1751},"\"I'll describe what I need\"",{"type":47,"value":1753}," — Ask the user to describe their data model in natural language (e.g., \"I'm building a task manager with projects, tasks, and team members\"). Generate a schema from the description, show it, and ask for confirmation before pushing.",{"type":42,"tag":50,"props":1755,"children":1756},{},[1757],{"type":47,"value":1758},"Once the schema has models and the user is ready, create a migration and generate the client:",{"type":42,"tag":334,"props":1760,"children":1762},{"className":336,"code":1761,"language":338,"meta":339,"style":339},"npx prisma migrate dev --name init\n",[1763],{"type":42,"tag":114,"props":1764,"children":1765},{"__ignoreMap":339},[1766],{"type":42,"tag":345,"props":1767,"children":1768},{"class":347,"line":348},[1769,1774,1778,1783,1788,1793],{"type":42,"tag":345,"props":1770,"children":1771},{"style":352},[1772],{"type":47,"value":1773},"npx",{"type":42,"tag":345,"props":1775,"children":1776},{"style":358},[1777],{"type":47,"value":959},{"type":42,"tag":345,"props":1779,"children":1780},{"style":358},[1781],{"type":47,"value":1782}," migrate",{"type":42,"tag":345,"props":1784,"children":1785},{"style":358},[1786],{"type":47,"value":1787}," dev",{"type":42,"tag":345,"props":1789,"children":1790},{"style":358},[1791],{"type":47,"value":1792}," --name",{"type":42,"tag":345,"props":1794,"children":1795},{"style":358},[1796],{"type":47,"value":1797}," init\n",{"type":42,"tag":50,"props":1799,"children":1800},{},[1801,1803,1809,1810,1815,1817,1823],{"type":47,"value":1802},"This creates migration files in ",{"type":42,"tag":114,"props":1804,"children":1806},{"className":1805},[],[1807],{"type":47,"value":1808},"prisma\u002Fmigrations\u002F",{"type":47,"value":1204},{"type":42,"tag":98,"props":1811,"children":1812},{},[1813],{"type":47,"value":1814},"and",{"type":47,"value":1816}," generates the client in one step. Migration history is essential for CI\u002FCD workflows (",{"type":42,"tag":114,"props":1818,"children":1820},{"className":1819},[],[1821],{"type":47,"value":1822},"prisma migrate deploy",{"type":47,"value":1824},") and production deployments.",{"type":42,"tag":50,"props":1826,"children":1827},{},[1828,1830,1836,1838,1844],{"type":47,"value":1829},"Only use ",{"type":42,"tag":114,"props":1831,"children":1833},{"className":1832},[],[1834],{"type":47,"value":1835},"npx prisma db push",{"type":47,"value":1837}," if the user explicitly asks for prototyping-only mode (no migration history). In that case, follow it with ",{"type":42,"tag":114,"props":1839,"children":1841},{"className":1840},[],[1842],{"type":47,"value":1843},"npx prisma generate",{"type":47,"value":446},{"type":42,"tag":216,"props":1846,"children":1848},{"id":1847},"step-7-verify-the-connection",[1849],{"type":47,"value":1850},"Step 7: Verify the connection",{"type":42,"tag":50,"props":1852,"children":1853},{},[1854,1856,1861],{"type":47,"value":1855},"After generating the client, create and run a quick verification script to confirm everything works end-to-end. This is ",{"type":42,"tag":98,"props":1857,"children":1858},{},[1859],{"type":47,"value":1860},"critical",{"type":47,"value":1862}," — do not skip this step.",{"type":42,"tag":50,"props":1864,"children":1865},{},[1866,1868,1874],{"type":47,"value":1867},"Create a file named ",{"type":42,"tag":114,"props":1869,"children":1871},{"className":1870},[],[1872],{"type":47,"value":1873},"test-connection.ts",{"type":47,"value":1424},{"type":42,"tag":334,"props":1876,"children":1878},{"className":1276,"code":1877,"language":1278,"meta":339,"style":339},"import 'dotenv\u002Fconfig'\nimport pg from 'pg'\nimport { PrismaPg } from '@prisma\u002Fadapter-pg'\nimport { PrismaClient } from '.\u002Fgenerated\u002Fprisma\u002Fclient.js'\n\nconst pool = new pg.Pool({ connectionString: process.env.DATABASE_URL })\nconst adapter = new PrismaPg(pool)\nconst prisma = new PrismaClient({ adapter })\n\nconst result = await prisma.$queryRawUnsafe('SELECT 1 as connected')\nconsole.log('Connected to Prisma Postgres:', result)\n\nawait prisma.$disconnect()\nawait pool.end()\n",[1879],{"type":42,"tag":114,"props":1880,"children":1881},{"__ignoreMap":339},[1882,1901,1929,1965,2002,2009,2093,2122,2166,2173,2228,2271,2279,2306],{"type":42,"tag":345,"props":1883,"children":1884},{"class":347,"line":348},[1885,1889,1893,1897],{"type":42,"tag":345,"props":1886,"children":1887},{"style":1288},[1888],{"type":47,"value":1291},{"type":42,"tag":345,"props":1890,"children":1891},{"style":369},[1892],{"type":47,"value":577},{"type":42,"tag":345,"props":1894,"children":1895},{"style":358},[1896],{"type":47,"value":1370},{"type":42,"tag":345,"props":1898,"children":1899},{"style":369},[1900],{"type":47,"value":623},{"type":42,"tag":345,"props":1902,"children":1903},{"class":347,"line":396},[1904,1908,1913,1917,1921,1925],{"type":42,"tag":345,"props":1905,"children":1906},{"style":1288},[1907],{"type":47,"value":1291},{"type":42,"tag":345,"props":1909,"children":1910},{"style":380},[1911],{"type":47,"value":1912}," pg ",{"type":42,"tag":345,"props":1914,"children":1915},{"style":1288},[1916],{"type":47,"value":1301},{"type":42,"tag":345,"props":1918,"children":1919},{"style":369},[1920],{"type":47,"value":577},{"type":42,"tag":345,"props":1922,"children":1923},{"style":358},[1924],{"type":47,"value":1028},{"type":42,"tag":345,"props":1926,"children":1927},{"style":369},[1928],{"type":47,"value":623},{"type":42,"tag":345,"props":1930,"children":1931},{"class":347,"line":27},[1932,1936,1940,1945,1949,1953,1957,1961],{"type":42,"tag":345,"props":1933,"children":1934},{"style":1288},[1935],{"type":47,"value":1291},{"type":42,"tag":345,"props":1937,"children":1938},{"style":369},[1939],{"type":47,"value":1326},{"type":42,"tag":345,"props":1941,"children":1942},{"style":380},[1943],{"type":47,"value":1944}," PrismaPg",{"type":42,"tag":345,"props":1946,"children":1947},{"style":369},[1948],{"type":47,"value":1336},{"type":42,"tag":345,"props":1950,"children":1951},{"style":1288},[1952],{"type":47,"value":1341},{"type":42,"tag":345,"props":1954,"children":1955},{"style":369},[1956],{"type":47,"value":577},{"type":42,"tag":345,"props":1958,"children":1959},{"style":358},[1960],{"type":47,"value":1017},{"type":42,"tag":345,"props":1962,"children":1963},{"style":369},[1964],{"type":47,"value":623},{"type":42,"tag":345,"props":1966,"children":1967},{"class":347,"line":566},[1968,1972,1976,1981,1985,1989,1993,1998],{"type":42,"tag":345,"props":1969,"children":1970},{"style":1288},[1971],{"type":47,"value":1291},{"type":42,"tag":345,"props":1973,"children":1974},{"style":369},[1975],{"type":47,"value":1326},{"type":42,"tag":345,"props":1977,"children":1978},{"style":380},[1979],{"type":47,"value":1980}," PrismaClient",{"type":42,"tag":345,"props":1982,"children":1983},{"style":369},[1984],{"type":47,"value":1336},{"type":42,"tag":345,"props":1986,"children":1987},{"style":1288},[1988],{"type":47,"value":1341},{"type":42,"tag":345,"props":1990,"children":1991},{"style":369},[1992],{"type":47,"value":577},{"type":42,"tag":345,"props":1994,"children":1995},{"style":358},[1996],{"type":47,"value":1997},".\u002Fgenerated\u002Fprisma\u002Fclient.js",{"type":42,"tag":345,"props":1999,"children":2000},{"style":369},[2001],{"type":47,"value":623},{"type":42,"tag":345,"props":2003,"children":2004},{"class":347,"line":585},[2005],{"type":42,"tag":345,"props":2006,"children":2007},{"emptyLinePlaceholder":1380},[2008],{"type":47,"value":1383},{"type":42,"tag":345,"props":2010,"children":2011},{"class":347,"line":594},[2012,2018,2023,2028,2033,2037,2041,2046,2050,2055,2060,2064,2068,2072,2076,2080,2085,2089],{"type":42,"tag":345,"props":2013,"children":2015},{"style":2014},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[2016],{"type":47,"value":2017},"const",{"type":42,"tag":345,"props":2019,"children":2020},{"style":380},[2021],{"type":47,"value":2022}," pool ",{"type":42,"tag":345,"props":2024,"children":2025},{"style":369},[2026],{"type":47,"value":2027},"=",{"type":42,"tag":345,"props":2029,"children":2030},{"style":369},[2031],{"type":47,"value":2032}," new",{"type":42,"tag":345,"props":2034,"children":2035},{"style":380},[2036],{"type":47,"value":974},{"type":42,"tag":345,"props":2038,"children":2039},{"style":369},[2040],{"type":47,"value":446},{"type":42,"tag":345,"props":2042,"children":2043},{"style":1399},[2044],{"type":47,"value":2045},"Pool",{"type":42,"tag":345,"props":2047,"children":2048},{"style":380},[2049],{"type":47,"value":1406},{"type":42,"tag":345,"props":2051,"children":2052},{"style":369},[2053],{"type":47,"value":2054},"{",{"type":42,"tag":345,"props":2056,"children":2057},{"style":1416},[2058],{"type":47,"value":2059}," connectionString",{"type":42,"tag":345,"props":2061,"children":2062},{"style":369},[2063],{"type":47,"value":1424},{"type":42,"tag":345,"props":2065,"children":2066},{"style":380},[2067],{"type":47,"value":1564},{"type":42,"tag":345,"props":2069,"children":2070},{"style":369},[2071],{"type":47,"value":446},{"type":42,"tag":345,"props":2073,"children":2074},{"style":380},[2075],{"type":47,"value":1573},{"type":42,"tag":345,"props":2077,"children":2078},{"style":369},[2079],{"type":47,"value":446},{"type":42,"tag":345,"props":2081,"children":2082},{"style":380},[2083],{"type":47,"value":2084},"DATABASE_URL ",{"type":42,"tag":345,"props":2086,"children":2087},{"style":369},[2088],{"type":47,"value":1605},{"type":42,"tag":345,"props":2090,"children":2091},{"style":380},[2092],{"type":47,"value":1610},{"type":42,"tag":345,"props":2094,"children":2095},{"class":347,"line":603},[2096,2100,2105,2109,2113,2117],{"type":42,"tag":345,"props":2097,"children":2098},{"style":2014},[2099],{"type":47,"value":2017},{"type":42,"tag":345,"props":2101,"children":2102},{"style":380},[2103],{"type":47,"value":2104}," adapter ",{"type":42,"tag":345,"props":2106,"children":2107},{"style":369},[2108],{"type":47,"value":2027},{"type":42,"tag":345,"props":2110,"children":2111},{"style":369},[2112],{"type":47,"value":2032},{"type":42,"tag":345,"props":2114,"children":2115},{"style":1399},[2116],{"type":47,"value":1944},{"type":42,"tag":345,"props":2118,"children":2119},{"style":380},[2120],{"type":47,"value":2121},"(pool)\n",{"type":42,"tag":345,"props":2123,"children":2124},{"class":347,"line":612},[2125,2129,2134,2138,2142,2146,2150,2154,2158,2162],{"type":42,"tag":345,"props":2126,"children":2127},{"style":2014},[2128],{"type":47,"value":2017},{"type":42,"tag":345,"props":2130,"children":2131},{"style":380},[2132],{"type":47,"value":2133}," prisma ",{"type":42,"tag":345,"props":2135,"children":2136},{"style":369},[2137],{"type":47,"value":2027},{"type":42,"tag":345,"props":2139,"children":2140},{"style":369},[2141],{"type":47,"value":2032},{"type":42,"tag":345,"props":2143,"children":2144},{"style":1399},[2145],{"type":47,"value":1980},{"type":42,"tag":345,"props":2147,"children":2148},{"style":380},[2149],{"type":47,"value":1406},{"type":42,"tag":345,"props":2151,"children":2152},{"style":369},[2153],{"type":47,"value":2054},{"type":42,"tag":345,"props":2155,"children":2156},{"style":380},[2157],{"type":47,"value":2104},{"type":42,"tag":345,"props":2159,"children":2160},{"style":369},[2161],{"type":47,"value":1605},{"type":42,"tag":345,"props":2163,"children":2164},{"style":380},[2165],{"type":47,"value":1610},{"type":42,"tag":345,"props":2167,"children":2168},{"class":347,"line":1549},[2169],{"type":42,"tag":345,"props":2170,"children":2171},{"emptyLinePlaceholder":1380},[2172],{"type":47,"value":1383},{"type":42,"tag":345,"props":2174,"children":2175},{"class":347,"line":1590},[2176,2180,2185,2189,2194,2198,2202,2207,2211,2215,2220,2224],{"type":42,"tag":345,"props":2177,"children":2178},{"style":2014},[2179],{"type":47,"value":2017},{"type":42,"tag":345,"props":2181,"children":2182},{"style":380},[2183],{"type":47,"value":2184}," result ",{"type":42,"tag":345,"props":2186,"children":2187},{"style":369},[2188],{"type":47,"value":2027},{"type":42,"tag":345,"props":2190,"children":2191},{"style":1288},[2192],{"type":47,"value":2193}," await",{"type":42,"tag":345,"props":2195,"children":2196},{"style":380},[2197],{"type":47,"value":959},{"type":42,"tag":345,"props":2199,"children":2200},{"style":369},[2201],{"type":47,"value":446},{"type":42,"tag":345,"props":2203,"children":2204},{"style":1399},[2205],{"type":47,"value":2206},"$queryRawUnsafe",{"type":42,"tag":345,"props":2208,"children":2209},{"style":380},[2210],{"type":47,"value":1406},{"type":42,"tag":345,"props":2212,"children":2213},{"style":369},[2214],{"type":47,"value":1505},{"type":42,"tag":345,"props":2216,"children":2217},{"style":358},[2218],{"type":47,"value":2219},"SELECT 1 as connected",{"type":42,"tag":345,"props":2221,"children":2222},{"style":369},[2223],{"type":47,"value":1505},{"type":42,"tag":345,"props":2225,"children":2226},{"style":380},[2227],{"type":47,"value":1610},{"type":42,"tag":345,"props":2229,"children":2230},{"class":347,"line":1599},[2231,2236,2240,2245,2249,2253,2258,2262,2266],{"type":42,"tag":345,"props":2232,"children":2233},{"style":380},[2234],{"type":47,"value":2235},"console",{"type":42,"tag":345,"props":2237,"children":2238},{"style":369},[2239],{"type":47,"value":446},{"type":42,"tag":345,"props":2241,"children":2242},{"style":1399},[2243],{"type":47,"value":2244},"log",{"type":42,"tag":345,"props":2246,"children":2247},{"style":380},[2248],{"type":47,"value":1406},{"type":42,"tag":345,"props":2250,"children":2251},{"style":369},[2252],{"type":47,"value":1505},{"type":42,"tag":345,"props":2254,"children":2255},{"style":358},[2256],{"type":47,"value":2257},"Connected to Prisma Postgres:",{"type":42,"tag":345,"props":2259,"children":2260},{"style":369},[2261],{"type":47,"value":1505},{"type":42,"tag":345,"props":2263,"children":2264},{"style":369},[2265],{"type":47,"value":1492},{"type":42,"tag":345,"props":2267,"children":2268},{"style":380},[2269],{"type":47,"value":2270}," result)\n",{"type":42,"tag":345,"props":2272,"children":2274},{"class":347,"line":2273},12,[2275],{"type":42,"tag":345,"props":2276,"children":2277},{"emptyLinePlaceholder":1380},[2278],{"type":47,"value":1383},{"type":42,"tag":345,"props":2280,"children":2282},{"class":347,"line":2281},13,[2283,2288,2292,2296,2301],{"type":42,"tag":345,"props":2284,"children":2285},{"style":1288},[2286],{"type":47,"value":2287},"await",{"type":42,"tag":345,"props":2289,"children":2290},{"style":380},[2291],{"type":47,"value":959},{"type":42,"tag":345,"props":2293,"children":2294},{"style":369},[2295],{"type":47,"value":446},{"type":42,"tag":345,"props":2297,"children":2298},{"style":1399},[2299],{"type":47,"value":2300},"$disconnect",{"type":42,"tag":345,"props":2302,"children":2303},{"style":380},[2304],{"type":47,"value":2305},"()\n",{"type":42,"tag":345,"props":2307,"children":2309},{"class":347,"line":2308},14,[2310,2314,2319,2323,2328],{"type":42,"tag":345,"props":2311,"children":2312},{"style":1288},[2313],{"type":47,"value":2287},{"type":42,"tag":345,"props":2315,"children":2316},{"style":380},[2317],{"type":47,"value":2318}," pool",{"type":42,"tag":345,"props":2320,"children":2321},{"style":369},[2322],{"type":47,"value":446},{"type":42,"tag":345,"props":2324,"children":2325},{"style":1399},[2326],{"type":47,"value":2327},"end",{"type":42,"tag":345,"props":2329,"children":2330},{"style":380},[2331],{"type":47,"value":2305},{"type":42,"tag":50,"props":2333,"children":2334},{},[2335],{"type":47,"value":2336},"Run it:",{"type":42,"tag":334,"props":2338,"children":2340},{"className":336,"code":2339,"language":338,"meta":339,"style":339},"npx tsx test-connection.ts\n",[2341],{"type":42,"tag":114,"props":2342,"children":2343},{"__ignoreMap":339},[2344],{"type":42,"tag":345,"props":2345,"children":2346},{"class":347,"line":348},[2347,2351,2356],{"type":42,"tag":345,"props":2348,"children":2349},{"style":352},[2350],{"type":47,"value":1773},{"type":42,"tag":345,"props":2352,"children":2353},{"style":358},[2354],{"type":47,"value":2355}," tsx",{"type":42,"tag":345,"props":2357,"children":2358},{"style":358},[2359],{"type":47,"value":2360}," test-connection.ts\n",{"type":42,"tag":50,"props":2362,"children":2363},{},[2364],{"type":42,"tag":98,"props":2365,"children":2366},{},[2367],{"type":47,"value":2368},"Prisma 7 client instantiation rules:",{"type":42,"tag":68,"props":2370,"children":2371},{},[2372,2390,2410,2423,2444,2462],{"type":42,"tag":72,"props":2373,"children":2374},{},[2375,2377,2382,2383,2389],{"type":47,"value":2376},"Import from ",{"type":42,"tag":114,"props":2378,"children":2380},{"className":2379},[],[2381],{"type":47,"value":1997},{"type":47,"value":1658},{"type":42,"tag":114,"props":2384,"children":2386},{"className":2385},[],[2387],{"type":47,"value":2388},".\u002Fgenerated\u002Fprisma",{"type":47,"value":177},{"type":42,"tag":72,"props":2391,"children":2392},{},[2393,2395,2401,2403,2408],{"type":47,"value":2394},"Create a ",{"type":42,"tag":114,"props":2396,"children":2398},{"className":2397},[],[2399],{"type":47,"value":2400},"pg.Pool",{"type":47,"value":2402}," with the ",{"type":42,"tag":114,"props":2404,"children":2406},{"className":2405},[],[2407],{"type":47,"value":1582},{"type":47,"value":2409}," connection string",{"type":42,"tag":72,"props":2411,"children":2412},{},[2413,2415,2421],{"type":47,"value":2414},"Wrap it in a ",{"type":42,"tag":114,"props":2416,"children":2418},{"className":2417},[],[2419],{"type":47,"value":2420},"PrismaPg",{"type":47,"value":2422}," adapter",{"type":42,"tag":72,"props":2424,"children":2425},{},[2426,2428,2434,2436,2442],{"type":47,"value":2427},"Pass ",{"type":42,"tag":114,"props":2429,"children":2431},{"className":2430},[],[2432],{"type":47,"value":2433},"{ adapter }",{"type":47,"value":2435}," to the ",{"type":42,"tag":114,"props":2437,"children":2439},{"className":2438},[],[2440],{"type":47,"value":2441},"PrismaClient",{"type":47,"value":2443}," constructor",{"type":42,"tag":72,"props":2445,"children":2446},{},[2447,2448,2452,2454,2460],{"type":47,"value":96},{"type":42,"tag":98,"props":2449,"children":2450},{},[2451],{"type":47,"value":102},{"type":47,"value":2453}," use ",{"type":42,"tag":114,"props":2455,"children":2457},{"className":2456},[],[2458],{"type":47,"value":2459},"datasourceUrl",{"type":47,"value":2461}," — that option does not exist in Prisma 7",{"type":42,"tag":72,"props":2463,"children":2464},{},[2465,2466,2470,2471,2477],{"type":47,"value":96},{"type":42,"tag":98,"props":2467,"children":2468},{},[2469],{"type":47,"value":102},{"type":47,"value":2453},{"type":42,"tag":114,"props":2472,"children":2474},{"className":2473},[],[2475],{"type":47,"value":2476},"new PrismaClient()",{"type":47,"value":2478}," with no arguments — it will throw",{"type":42,"tag":50,"props":2480,"children":2481},{},[2482,2484,2489],{"type":47,"value":2483},"After verification succeeds, delete ",{"type":42,"tag":114,"props":2485,"children":2487},{"className":2486},[],[2488],{"type":47,"value":1873},{"type":47,"value":446},{"type":42,"tag":50,"props":2491,"children":2492},{},[2493],{"type":47,"value":2494},"Then share links for the user to explore their database:",{"type":42,"tag":68,"props":2496,"children":2497},{},[2498,2515],{"type":42,"tag":72,"props":2499,"children":2500},{},[2501,2506,2507,2513],{"type":42,"tag":98,"props":2502,"children":2503},{},[2504],{"type":47,"value":2505},"Prisma Studio (CLI):",{"type":47,"value":1204},{"type":42,"tag":114,"props":2508,"children":2510},{"className":2509},[],[2511],{"type":47,"value":2512},"npx prisma studio",{"type":47,"value":2514}," — opens a visual data browser locally",{"type":42,"tag":72,"props":2516,"children":2517},{},[2518,2523,2524,2530,2532,2538,2539,2544,2545,2550],{"type":42,"tag":98,"props":2519,"children":2520},{},[2521],{"type":47,"value":2522},"Console:",{"type":47,"value":1204},{"type":42,"tag":114,"props":2525,"children":2527},{"className":2526},[],[2528],{"type":47,"value":2529},"https:\u002F\u002Fconsole.prisma.io\u002F\u003CworkspaceId>\u002F\u003CprojectId>\u002F\u003CdatabaseId>\u002Fdashboard",{"type":47,"value":2531}," — strip the prefixes (",{"type":42,"tag":114,"props":2533,"children":2535},{"className":2534},[],[2536],{"type":47,"value":2537},"wksp_",{"type":47,"value":415},{"type":42,"tag":114,"props":2540,"children":2542},{"className":2541},[],[2543],{"type":47,"value":661},{"type":47,"value":415},{"type":42,"tag":114,"props":2546,"children":2548},{"className":2547},[],[2549],{"type":47,"value":679},{"type":47,"value":2551},") from the IDs returned in Step 3 to build this URL",{"type":42,"tag":50,"props":2553,"children":2554},{},[2555,2556,2562],{"type":47,"value":302},{"type":42,"tag":114,"props":2557,"children":2559},{"className":2558},[],[2560],{"type":47,"value":2561},"references\u002Fprisma7-client.md",{"type":47,"value":2563}," for the full client instantiation reference.",{"type":42,"tag":56,"props":2565,"children":2567},{"id":2566},"error-handling",[2568],{"type":47,"value":2569},"Error Handling",{"type":42,"tag":50,"props":2571,"children":2572},{},[2573,2574,2580],{"type":47,"value":302},{"type":42,"tag":114,"props":2575,"children":2577},{"className":2576},[],[2578],{"type":47,"value":2579},"references\u002Fapi-basics.md",{"type":47,"value":2581}," for the full error reference. Key self-correction patterns:",{"type":42,"tag":2583,"props":2584,"children":2585},"table",{},[2586,2610],{"type":42,"tag":2587,"props":2588,"children":2589},"thead",{},[2590],{"type":42,"tag":2591,"props":2592,"children":2593},"tr",{},[2594,2600,2605],{"type":42,"tag":2595,"props":2596,"children":2597},"th",{},[2598],{"type":47,"value":2599},"HTTP Status",{"type":42,"tag":2595,"props":2601,"children":2602},{},[2603],{"type":47,"value":2604},"Error Code",{"type":42,"tag":2595,"props":2606,"children":2607},{},[2608],{"type":47,"value":2609},"Action",{"type":42,"tag":2611,"props":2612,"children":2613},"tbody",{},[2614,2637,2679,2715],{"type":42,"tag":2591,"props":2615,"children":2616},{},[2617,2623,2632],{"type":42,"tag":2618,"props":2619,"children":2620},"td",{},[2621],{"type":47,"value":2622},"401",{"type":42,"tag":2618,"props":2624,"children":2625},{},[2626],{"type":42,"tag":114,"props":2627,"children":2629},{"className":2628},[],[2630],{"type":47,"value":2631},"authentication-failed",{"type":42,"tag":2618,"props":2633,"children":2634},{},[2635],{"type":47,"value":2636},"Service token is invalid or expired. Ask the user to create a new one in Console → Workspace Settings → Service Tokens.",{"type":42,"tag":2591,"props":2638,"children":2639},{},[2640,2645,2654],{"type":42,"tag":2618,"props":2641,"children":2642},{},[2643],{"type":47,"value":2644},"404",{"type":42,"tag":2618,"props":2646,"children":2647},{},[2648],{"type":42,"tag":114,"props":2649,"children":2651},{"className":2650},[],[2652],{"type":47,"value":2653},"resource-not-found",{"type":42,"tag":2618,"props":2655,"children":2656},{},[2657,2659,2664,2665,2670,2671,2677],{"type":47,"value":2658},"Check that the resource ID includes the correct prefix (",{"type":42,"tag":114,"props":2660,"children":2662},{"className":2661},[],[2663],{"type":47,"value":661},{"type":47,"value":415},{"type":42,"tag":114,"props":2666,"children":2668},{"className":2667},[],[2669],{"type":47,"value":679},{"type":47,"value":415},{"type":42,"tag":114,"props":2672,"children":2674},{"className":2673},[],[2675],{"type":47,"value":2676},"con_",{"type":47,"value":2678},").",{"type":42,"tag":2591,"props":2680,"children":2681},{},[2682,2687,2696],{"type":42,"tag":2618,"props":2683,"children":2684},{},[2685],{"type":47,"value":2686},"422",{"type":42,"tag":2618,"props":2688,"children":2689},{},[2690],{"type":42,"tag":114,"props":2691,"children":2693},{"className":2692},[],[2694],{"type":47,"value":2695},"validation-error",{"type":42,"tag":2618,"props":2697,"children":2698},{},[2699,2701,2706,2708,2714],{"type":47,"value":2700},"Check request body against the endpoint schema. Common: missing ",{"type":42,"tag":114,"props":2702,"children":2704},{"className":2703},[],[2705],{"type":47,"value":421},{"type":47,"value":2707},", invalid ",{"type":42,"tag":114,"props":2709,"children":2711},{"className":2710},[],[2712],{"type":47,"value":2713},"region",{"type":47,"value":446},{"type":42,"tag":2591,"props":2716,"children":2717},{},[2718,2723,2732],{"type":42,"tag":2618,"props":2719,"children":2720},{},[2721],{"type":47,"value":2722},"429",{"type":42,"tag":2618,"props":2724,"children":2725},{},[2726],{"type":42,"tag":114,"props":2727,"children":2729},{"className":2728},[],[2730],{"type":47,"value":2731},"rate-limit-exceeded",{"type":42,"tag":2618,"props":2733,"children":2734},{},[2735],{"type":47,"value":2736},"Back off and retry after a few seconds.",{"type":42,"tag":56,"props":2738,"children":2740},{"id":2739},"reference-files",[2741],{"type":47,"value":2742},"Reference Files",{"type":42,"tag":50,"props":2744,"children":2745},{},[2746],{"type":47,"value":2747},"Detailed API and usage information is in:",{"type":42,"tag":334,"props":2749,"children":2752},{"className":2750,"code":2751,"language":47},[1080],"references\u002Fauth.md             — Service token creation and usage\nreferences\u002Fapi-basics.md       — Base URL, envelope, IDs, errors, pagination\nreferences\u002Fendpoints.md        — Endpoint details for projects, databases, connections, regions\nreferences\u002Fprisma7-client.md   — Prisma 7 client instantiation and usage patterns\n",[2753],{"type":42,"tag":114,"props":2754,"children":2755},{"__ignoreMap":339},[2756],{"type":47,"value":2751},{"type":42,"tag":2758,"props":2759,"children":2760},"style",{},[2761],{"type":47,"value":2762},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2764,"total":2933},[2765,2781,2796,2809,2822,2836,2854,2865,2879,2892,2903,2919],{"slug":2766,"name":2766,"fn":2767,"description":2768,"org":2769,"tags":2770,"stars":2778,"repoUrl":2779,"updatedAt":2780},"prisma-next","guide Prisma Next project setup and usage","Route a vague Prisma Next prompt to the right specific skill. Use for \"help me with Prisma Next\", \"what is Prisma Next\", \"explain Prisma Next\", \"I'm new to PN\", \"where do I start\", \"what can I do with Prisma Next\", \"what can I do next with Prisma\", \"just ran createprisma\", \"tour of Prisma Next\", \"Prisma Next overview\", and comparison questions like \"Prisma Next vs Prisma 7\", \"PN vs Drizzle\", \"PN vs Kysely\", \"PN vs TypeORM\". Do NOT use when the prompt clearly matches a workflow skill — adoption \u002F quickstart \u002F first-touch orientation \u002F brownfield introspection, schema \u002F contract editing, migration authoring (db update \u002F migration plan \u002F migrate), migration review on deploy \u002F concurrent migrations, queries \u002F db.orm \u002F db.sql \u002F TypedSQL, Supabase \u002F RLS \u002F role binding, runtime \u002F db.ts \u002F middleware wiring, build \u002F Vite plugin \u002F Next.js plugin, debug \u002F structured error envelopes \u002F PN-* error codes, or feedback \u002F bug report \u002F feature request — load that sibling skill directly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2771,2772,2775,2776],{"name":17,"slug":18,"type":15},{"name":2773,"slug":2774,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":2777,"slug":1278,"type":15},"TypeScript",415,"https:\u002F\u002Fgithub.com\u002Fprisma\u002Fprisma-next","2026-07-17T05:32:04.322957",{"slug":2782,"name":2782,"fn":2783,"description":2784,"org":2785,"tags":2786,"stars":2778,"repoUrl":2779,"updatedAt":2795},"prisma-next-build","integrate Prisma Next into build systems","Wire Prisma Next into the project's build system with the right build-tool plugin — Vite today via @prisma-next\u002Fvite-plugin-contract-emit (Vite 7 \u002F 8); Next.js \u002F Webpack \u002F esbuild \u002F Rollup \u002F Turbopack are named as gaps rather than fabricated. Always offers the Vite plugin proactively when the project is using Vite. Use for vite plugin, vite-plugin, vite.config.ts, prismaVitePlugin, contract emit on save, HMR, hot reload contract, dev server, Next.js plugin, next plugin, withPrismaNext, webpack plugin, esbuild plugin, rollup plugin, build integration, dev server plugin, vite 7, vite 8.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2787,2790,2791,2792],{"name":2788,"slug":2789,"type":15},"Deployment","deployment",{"name":2773,"slug":2774,"type":15},{"name":9,"slug":8,"type":15},{"name":2793,"slug":2794,"type":15},"Vite","vite","2026-07-02T07:31:36.108254",{"slug":2797,"name":2797,"fn":2798,"description":2799,"org":2800,"tags":2801,"stars":2778,"repoUrl":2779,"updatedAt":2808},"prisma-next-contract","edit Prisma Next data contracts and models","Edit the Prisma Next data contract — add models, fields, relations, indexes, enums, value objects (composite types), type aliases, namespaces (Postgres schemas), cross-contract foreign keys (cross-space FK), polymorphic types (`@@discriminator` \u002F `@@base`), use extension namespaces (`pgvector.Vector(...)`, `cipherstash.EncryptedString(...)`), wire `prisma-next.config.ts` with `defineConfig` from the `@prisma-next\u002F\u003Ctarget>\u002Fconfig` façade, and run `prisma-next contract emit`. Use for schema, models, fields, attributes, soft delete, paranoid, scopes, validations, callbacks, prisma schema, PSL, contract.prisma, contract.ts, contract.json, contract.d.ts, `@prisma-next\u002Fpostgres\u002Fconfig`, `@prisma-next\u002Fpostgres\u002Fcontract-builder`, `@prisma-next\u002Fpostgres\u002Fcontrol`, `@prisma-next\u002Fmongo\u002Fconfig`, `@prisma-next\u002Fmongo\u002Fcontract-builder`, `extensions:`, pgvector, cipherstash, postgis, paradedb, supabase, `@prisma-next\u002Fextension-supabase`, `@@control`, control policy, managed, tolerated, external, observed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2802,2805,2806,2807],{"name":2803,"slug":2804,"type":15},"Data Modeling","data-modeling",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":2777,"slug":1278,"type":15},"2026-07-30T05:30:10.426962",{"slug":2810,"name":2810,"fn":2811,"description":2812,"org":2813,"tags":2814,"stars":2778,"repoUrl":2779,"updatedAt":2821},"prisma-next-debug","debug and recover from Prisma Next errors","Read a Prisma Next structured error envelope and route to the right recovery — code, domain, severity, why, fix, meta. Use for error, exception, my emit failed, my query won't typecheck, my query crashed, my migration won't apply, MIGRATION.HASH_MISMATCH, BUDGET.ROWS_EXCEEDED, BUDGET.TIME_EXCEEDED, RUNTIME.ABORTED, PLAN.HASH_MISMATCH, CONTRACT.MARKER_MISSING, PN-RUN-3001, PN-RUN-3002, PN-RUN-3030, PN-MIG-2001, PN-CLI-4011, PN-SCHEMA-0001, drift, capability missing, planner conflict, prisma studio, EXPLAIN, query log, db.end, db.close, script won't exit, hangs, close connection, pool.end, client is closed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2815,2816,2819,2820],{"name":17,"slug":18,"type":15},{"name":2817,"slug":2818,"type":15},"Debugging","debugging",{"name":2773,"slug":2774,"type":15},{"name":9,"slug":8,"type":15},"2026-07-24T05:37:10.436314",{"slug":2823,"name":2823,"fn":2824,"description":2825,"org":2826,"tags":2827,"stars":2778,"repoUrl":2779,"updatedAt":2835},"prisma-next-feedback","report Prisma Next issues and feedback","Hand a Prisma Next question or report off to the team — file a GitHub issue (bug or feature request), or route Q&A \u002F design discussion \u002F direct-team-contact to the Prisma Discord at pris.ly\u002Fdiscord. Use for bug, bug report, file an issue, report a bug, feature request, missing feature, this should be a feature, file this, this is a bug, this is broken, surprising behaviour, this doesn't work, file feedback, send feedback, capability gap, file via prisma-next-feedback, ask the team, talk to the team, talk to the Prisma team, talk to Prisma, Discord, Prisma Discord, Q&A, design feedback, is this the intended way, how should I do X, extension author question, extension author needs help.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2828,2831,2834],{"name":2829,"slug":2830,"type":15},"Documentation","documentation",{"name":2832,"slug":2833,"type":15},"GitHub","github",{"name":9,"slug":8,"type":15},"2026-07-02T07:31:34.870809",{"slug":2837,"name":2837,"fn":2838,"description":2839,"org":2840,"tags":2841,"stars":2778,"repoUrl":2779,"updatedAt":2853},"prisma-next-migration-review","review and resolve Prisma Next migrations","Review what Prisma Next migrations will run on merge or deploy, render the migration graph, resolve concurrent \u002F diamond-convergence conflicts, and configure environment refs for CI. Use for \"what migrations are going to run\", \"what runs on deploy\", merge conflict, diamond convergence, concurrent migrations, migration status, ref management, staging, production, MIGRATION.DIVERGED, MIGRATION.NO_MARKER, MIGRATION.MARKER_NOT_IN_HISTORY, prisma migrate status, prisma migrate diff, prisma migrate resolve.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2842,2845,2848,2849,2852],{"name":2843,"slug":2844,"type":15},"CI\u002FCD","ci-cd",{"name":2846,"slug":2847,"type":15},"Code Review","code-review",{"name":17,"slug":18,"type":15},{"name":2850,"slug":2851,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-24T05:37:11.422323",{"slug":2855,"name":2855,"fn":2856,"description":2857,"org":2858,"tags":2859,"stars":2778,"repoUrl":2779,"updatedAt":2864},"prisma-next-migrations","author and manage Prisma Next migrations","Author Prisma Next migrations — choose db update vs migration plan, edit the framework-rendered migration.ts (replace placeholder sentinels with dataTransform closures), recover from MIGRATION.HASH_MISMATCH or PN-MIG-2001 unfilled placeholder. Use for prisma migrate dev, prisma migrate deploy, prisma db push, db update, db update --dry-run, migration plan, migrate, migration new, migration show, db verify, db sign, data migration, this.dataTransform, dataTransform, placeholder, generated migration.ts, edit migration.ts, MIGRATION.HASH_MISMATCH, schema drift.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2860,2861,2862,2863],{"name":17,"slug":18,"type":15},{"name":2850,"slug":2851,"type":15},{"name":9,"slug":8,"type":15},{"name":2777,"slug":1278,"type":15},"2026-07-24T05:37:13.469138",{"slug":2866,"name":2866,"fn":2867,"description":2868,"org":2869,"tags":2870,"stars":2778,"repoUrl":2779,"updatedAt":2878},"prisma-next-queries","write Prisma Next queries for database operations","Write Prisma Next queries for Postgres, SQLite, or Mongo — pick a lane (Postgres\u002FSQLite `db.orm.\u003CModel>` + `db.sql.\u003Ctable>`; Mongo `db.orm.\u003Croot>` + `db.query.from(...)` pipeline builder), filter \u002F project \u002F sort \u002F paginate, eager-load with `.include(...)`, Postgres\u002FSQLite `db.transaction(...)`, Postgres\u002FSQLite ORM `.aggregate(...)`, Mongo aggregations via query builder, namespace-aware accessors (`db.orm.\u003Cns>.\u003CModel>`, `db.sql.\u003Cns>.\u003Ctable>`). Triggers: query, where, match, select, project, orderBy, take, skip, include, lookup, first, all, count, aggregate, group, create, update, delete, upsert, returning, transaction, db.close, script teardown, variant, polymorphism, drizzle-style, kysely-style. Notes: `.all()` is a Thenable (just `await` it), iterators are single-use (`RUNTIME.ITERATOR_CONSUMED`), Postgres `count` is `number` while sum\u002Favg\u002Fmin\u002Fmax are `number | null`, ranges use chained `.where()` or `and(...)` (no `.between(...)`).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2871,2872,2873,2874,2875],{"name":17,"slug":18,"type":15},{"name":2773,"slug":2774,"type":15},{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":2876,"slug":2877,"type":15},"SQL","sql","2026-07-17T05:32:03.35373",{"slug":2880,"name":2880,"fn":2881,"description":2882,"org":2883,"tags":2884,"stars":2778,"repoUrl":2779,"updatedAt":2891},"prisma-next-quickstart","adopt Prisma Next in projects","Adopt Prisma Next into a new project, onto an existing database, or as the first move after a bootstrap tool dropped you into a scaffold. Use for \"what can I do with Prisma Next\", \"what can I do next with Prisma\", \"where do I start\", \"what should I do first\", \"just ran createprisma\", \"createprisma\", \"npx createprisma\", \"npx create-prisma\", \"first steps\", \"first query\", \"I have a scaffolded Prisma Next project what now\"; for `pnpm dlx prisma-next init` greenfield setup; and for `prisma-next contract infer` + `db sign` against an existing database. Also covers the connect-write-read first-arc orientation, the day-to-day commands (`contract emit`, `db init`, `db update`, `migration plan`, `migrate`, `db schema`, `db verify`), and routing to `prisma-next-contract` \u002F `prisma-next-queries` \u002F `prisma-next-runtime` for the next move. Flags: --target, --authoring, --schema-path, --probe-db, --output.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2885,2886,2889,2890],{"name":17,"slug":18,"type":15},{"name":2887,"slug":2888,"type":15},"ORM","orm",{"name":9,"slug":8,"type":15},{"name":2777,"slug":1278,"type":15},"2026-07-24T05:37:12.462072",{"slug":2893,"name":2893,"fn":2894,"description":2895,"org":2896,"tags":2897,"stars":2778,"repoUrl":2779,"updatedAt":2902},"prisma-next-runtime","configure Prisma Next runtime and database connections","Wire the Prisma Next runtime — `db.ts` setup using `postgres\u003CContract>(...)` from `@prisma-next\u002Fpostgres\u002Fruntime`, `sqlite\u003CContract>(...)` from `@prisma-next\u002Fsqlite\u002Fruntime`, or `mongo\u003CContract>(...)` from `@prisma-next\u002Fmongo\u002Fruntime`; middleware composition (telemetry from `@prisma-next\u002Fmiddleware-telemetry`; lints and budgets), `DATABASE_URL` config, per-environment branching, switching between Postgres, SQLite, and Mongo façades. Use for db.ts, postgres(), sqlite(), mongo(), middleware, telemetry, lints, budgets, DATABASE_URL, .env, connection pool, poolOptions, dev vs prod config, transactions, db.transaction, read replicas, multi-database, script won't exit, hangs, close connection, db.end, db.close, pool.end, [Symbol.asyncDispose], await using.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2898,2899,2900,2901],{"name":17,"slug":18,"type":15},{"name":2773,"slug":2774,"type":15},{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T05:32:05.347316",{"slug":2904,"name":2904,"fn":2905,"description":2906,"org":2907,"tags":2908,"stars":2778,"repoUrl":2779,"updatedAt":2918},"prisma-next-supabase","integrate Prisma with Supabase","Use Prisma Next with a Supabase project via `@prisma-next\u002Fextension-supabase` — wire `extensions: [supabasePack]`, declare cross-space FKs to `supabase:auth.AuthUser`, author RLS policies (`policy_select` \u002F `policy_update` \u002F `@@rls`, `auth.uid()` predicates), build `db.ts` with the `supabase()` factory, bind roles per request (`asUser(jwt)` \u002F `asAnon()` \u002F `asServiceRole()`), query `auth.*` \u002F `storage.*` via the `db.asServiceRole().supabase` admin root, and validate JWTs (`jwksUrl` for current projects \u002F `jwtSecret` for legacy HS256). Use for supabase, RLS, row level security, policy, role binding, anon, authenticated, service_role, auth.users, auth.uid(), JWT, JWKS, SUPABASE_JWKS_URL, SUPABASE_JWT_SECRET, SUPABASE.JWT_INVALID, SUPABASE.CONFIG_INVALID, RoleBoundDb, session pooler, supabase:auth.AuthUser, @prisma-next\u002Fextension-supabase.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2909,2912,2913,2914,2915],{"name":2910,"slug":2911,"type":15},"Auth","auth",{"name":2887,"slug":2888,"type":15},{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":2916,"slug":2917,"type":15},"Supabase","supabase","2026-07-30T05:30:11.065251",{"slug":2920,"name":2920,"fn":2921,"description":2922,"org":2923,"tags":2924,"stars":23,"repoUrl":24,"updatedAt":2932},"prisma-cli","run Prisma CLI commands","Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, studio, validate, format, debug, and mcp. Use for ORM\u002Fdatabase CLI workflows, not Prisma Compute app deployment. For Prisma Compute, `@prisma\u002Fcli app deploy`, `compute:deploy`, `create-prisma --deploy`, apps, deployments, logs, or domains, use the `prisma-compute` skill instead. Triggers on \"prisma init\", \"prisma generate\", \"prisma migrate\", \"prisma db\", \"prisma studio\", \"prisma mcp\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2925,2928,2929,2930,2931],{"name":2926,"slug":2927,"type":15},"CLI","cli",{"name":17,"slug":18,"type":15},{"name":2850,"slug":2851,"type":15},{"name":2887,"slug":2888,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:48:29.140467",21,{"items":2935,"total":1549},[2936,2944,2958,2971,2985,2999,3013],{"slug":2920,"name":2920,"fn":2921,"description":2922,"org":2937,"tags":2938,"stars":23,"repoUrl":24,"updatedAt":2932},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2939,2940,2941,2942,2943],{"name":2926,"slug":2927,"type":15},{"name":17,"slug":18,"type":15},{"name":2850,"slug":2851,"type":15},{"name":2887,"slug":2888,"type":15},{"name":9,"slug":8,"type":15},{"slug":2945,"name":2945,"fn":2946,"description":2947,"org":2948,"tags":2949,"stars":23,"repoUrl":24,"updatedAt":2957},"prisma-client-api","write database queries with Prisma Client","Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on \"prisma query\", \"findMany\", \"create\", \"update\", \"delete\", \"$transaction\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2950,2953,2954,2955,2956],{"name":2951,"slug":2952,"type":15},"API Development","api-development",{"name":17,"slug":18,"type":15},{"name":2887,"slug":2888,"type":15},{"name":9,"slug":8,"type":15},{"name":2777,"slug":1278,"type":15},"2026-04-06T18:48:31.666695",{"slug":2959,"name":2959,"fn":2960,"description":2961,"org":2962,"tags":2963,"stars":23,"repoUrl":24,"updatedAt":2970},"prisma-compute","deploy and host Prisma applications","Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma\u002Fcli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, `auth workspace`, Compute apps\u002Fdeployments\u002Fbuild logs\u002Fdomains, `@prisma\u002Fcli agent install`, `@prisma\u002Fcli feedback`, localhost vs `0.0.0.0`, deploy port binding, or framework deploy readiness for Hono, Elysia, Next.js, TanStack Start, Astro, Nuxt, Svelte, Nest, Turborepo, or custom\u002Fprebuilt artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2964,2965,2966,2967],{"name":2788,"slug":2789,"type":15},{"name":2887,"slug":2888,"type":15},{"name":9,"slug":8,"type":15},{"name":2968,"slug":2969,"type":15},"Serverless","serverless","2026-07-17T05:31:53.370495",{"slug":2972,"name":2972,"fn":2973,"description":2974,"org":2975,"tags":2976,"stars":23,"repoUrl":24,"updatedAt":2984},"prisma-database-setup","configure Prisma with database providers","Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on \"configure postgres\", \"connect to mysql\", \"setup mongodb\", \"sqlite setup\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2977,2978,2981,2982,2983],{"name":17,"slug":18,"type":15},{"name":2979,"slug":2980,"type":15},"MySQL","mysql",{"name":2887,"slug":2888,"type":15},{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:48:34.192852",{"slug":2986,"name":2986,"fn":2987,"description":2988,"org":2989,"tags":2990,"stars":23,"repoUrl":24,"updatedAt":2998},"prisma-driver-adapter-implementation","implement Prisma driver adapters","Required reference for Prisma v7 driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter\u002FTransaction interfaces. Contains critical contract details not inferable from code examples — including the transaction lifecycle protocol, error mapping requirements, and verification checklist. Existing implementations do not replace this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2991,2992,2995,2996,2997],{"name":17,"slug":18,"type":15},{"name":2993,"slug":2994,"type":15},"Engineering","engineering",{"name":2887,"slug":2888,"type":15},{"name":9,"slug":8,"type":15},{"name":2777,"slug":1278,"type":15},"2026-04-06T18:48:35.478693",{"slug":3000,"name":3000,"fn":3001,"description":3002,"org":3003,"tags":3004,"stars":23,"repoUrl":24,"updatedAt":3012},"prisma-mongodb-upgrade","migrate Prisma MongoDB projects to v6","Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when \"upgrade to prisma 7\" comes up in a project with provider = \"mongodb\", or when evaluating a move to Prisma Next. Triggers on \"upgrade prisma mongodb\", \"prisma 7 mongodb\", \"mongodb prisma migration\", \"prisma next mongodb\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3005,3006,3007,3010,3011],{"name":17,"slug":18,"type":15},{"name":2850,"slug":2851,"type":15},{"name":3008,"slug":3009,"type":15},"MongoDB","mongodb",{"name":2887,"slug":2888,"type":15},{"name":9,"slug":8,"type":15},"2026-07-11T05:35:03.668013",{"slug":3014,"name":3014,"fn":3015,"description":3016,"org":3017,"tags":3018,"stars":23,"repoUrl":24,"updatedAt":3026},"prisma-postgres","manage Prisma Postgres databases","Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db\u002Fcreate-pg\u002Fcreate-postgres, or integrating programmatic provisioning with service tokens or OAuth.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3019,3020,3021,3022,3023],{"name":2926,"slug":2927,"type":15},{"name":17,"slug":18,"type":15},{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":3024,"slug":3025,"type":15},"SDK","sdk","2026-07-17T05:31:52.398028"]