Skip to content

Docs restructure of Accelerate and Optimize content #6861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 30, 2025
Merged
79 changes: 43 additions & 36 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,91 @@
"language": "en",
"words": [
"Amplication",
"Astro",
"autocompletions",
"Autoincrementing",
"autoscale",
"backoff",
"baselined",
"Baselining",
"CASL",
"cockroachdb",
"codemod",
"codemods",
"Coolify",
"datamodel",
"datasource",
"Dittofeed",
"Documenso",
"Docusign",
"Dundring",
"Dyrector",
"earlyaccess",
"ecommerce",
"Fastify",
"Formbricks",
"fulltext",
"ghostfolio",
"Hasura",
"healthcheck",
"Hitori",
"hostable",
"hotfix",
"hotfixing",
"idempotency",
"InnoDB",
"ISAM",
"Kysely",
"leaderboard",
"Letterpad",
"livestream",
"microservices",
"Middlewares",
"MSSQLSERVER",
"neovim",
"Nestjs",
"Nuxt",
"Openform",
"Overfetching",
"pgbouncer",
"planetscale",
"pooler",
"poolers",
"Postico",
"Pothos",
"preconfigure",
"preconfigured",
"Quickstart",
"Rallly",
"Redistributable",
"refactorings",
"Replibyte",
"roadmap",
"runtimes",
"Scholarsome",
"serverful",
"signup",
"Snaplet",
"Solidstart",
"sqlserver",
"Streamdal",
"substep",
"substeps",
"Supabase",
"Sveltekit",
"Tabnine",
"TLDR",
"triaging",
"Turso",
"typesense",
"unikernel",
"unikernels",
"upsert",
"upserts",
"upvote",
"walkthrough",
"healthcheck",
"runtimes",
"substep",
"substeps",
"Supabase",
"Redistributable",
"Nuxt",
"Sveltekit",
"Pothos",
"backoff",
"Replibyte",
"Snaplet",
"Kysely",
"Turso",
"autocompletions",
"Formbricks",
"Openform",
"Documenso",
"Docusign",
"ghostfolio",
"Scholarsome",
"Dittofeed",
"Webstudio",
"Dyrector",
"Coolify",
"hostable",
"Rallly",
"Dundring",
"Letterpad",
"Hitori",
"Zenstack",
"Streamdal",
"leaderboard",
"typesense",
"Solidstart",
"Astro",
"unikernels",
"Postico",
"CASL",
"serverful",
Expand Down Expand Up @@ -118,7 +124,8 @@
"Turborepo",
"Deepgram",
"PGSSLMODE",
"pgloader"
"pgloader",
"unikernel"
],
"patterns": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ npx prisma studio

## 6. Explore caching with Prisma Accelerate

The [`src/caching.ts`](https://github.com/prisma/prisma-examples/blob/latest/databases/prisma-postgres/src/caching.ts) script contains a sample query that uses [Stale-While-Revalidate](/accelerate/caching#stale-while-revalidate-swr) (SWR) and [Time-To-Live](/accelerate/caching#time-to-live-ttl) (TTL) to cache a database query using Prisma Accelerate. You can execute it as follows:
The [`src/caching.ts`](https://github.com/prisma/prisma-examples/blob/latest/databases/prisma-postgres/src/caching.ts) script contains a sample query that uses [Stale-While-Revalidate](/postgres/database/caching#stale-while-revalidate-swr) (SWR) and [Time-To-Live](/postgres/database/caching#time-to-live-ttl) (TTL) to cache a database query using Prisma Accelerate. You can execute it as follows:

```terminal
npm run caching
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can accomplish this migration in three steps:
1. Export your existing data via `pg_dump`.
1. Import the previously exported data into Prisma Postgres via `pg_restore`.

In the third step, you will be using the [TCP tunnel](/postgres/tcp-tunnel) to securely connect to your Prisma Postgres database during to run `pg_restore`.
In the third step, you will be using the [TCP tunnel](/postgres/database/tcp-tunnel) to securely connect to your Prisma Postgres database during to run `pg_restore`.

## Prerequisites

Expand Down Expand Up @@ -155,7 +155,7 @@ Running this command will create a backup file named `db_dump.bak` which you wil

## 3. Import data into Prisma Postgres

In this step, you'll use the [TCP tunnel](/postgres/tcp-tunnel) to connect to your Prisma Postgres instance and import data via `pg_restore`.
In this step, you'll use the [TCP tunnel](/postgres/database/tcp-tunnel) to connect to your Prisma Postgres instance and import data via `pg_restore`.

You'll also need the Prisma Postgres connection URL from step 1, it should look similar to this:

Expand Down Expand Up @@ -231,7 +231,7 @@ You don't need to provide username and password credentials to this command beca

You now successfully imported the data from your your existing PostgreSQL database into Prisma Postgres 🎉

To validate that the import worked, you can use [Prisma Studio](/postgres/tooling#viewing-and-editing-data-in-prisma-studio). Either open it in the [Platform Console](https://console.prisma.io) by clicking the **Studio** tab in the left-hand sidenav in your project or run this command to launch Prisma Studio locally:
To validate that the import worked, you can use [Prisma Studio](/postgres/database/tooling#viewing-and-editing-data-in-prisma-studio). Either open it in the [Platform Console](https://console.prisma.io) by clicking the **Studio** tab in the left-hand sidenav in your project or run this command to launch Prisma Studio locally:

```terminal
npx prisma studio
Expand All @@ -248,7 +248,7 @@ If you already using Prisma ORM, the only things you need to do are:

#### 4.A.1. Add the Prisma Accelerate extension

Th Prisma Accelerate extension is [required](/postgres/overview#using-the-client-extension-for-prisma-accelerate-required) when using Prisma Postgres. If you are not currently using Prisma Accelerate with Prisma ORM, go through the following steps to make Prisma ORM work with Prisma Postgres.
Th Prisma Accelerate extension is [required](/postgres/introduction/overview#using-the-client-extension-for-prisma-accelerate-required) when using Prisma Postgres. If you are not currently using Prisma Accelerate with Prisma ORM, go through the following steps to make Prisma ORM work with Prisma Postgres.

First, install the `@prisma/extension-accelerate` package in your project:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Once your database was provisioned, find your Prisma Postgres connection URL in

## 2. Connect directly to a Prisma Postgres instance

In this step, you'll use a secure [TCP tunnel](/postgres/tcp-tunnel) to connect to your Prisma Postgres instance.
In this step, you'll use a secure [TCP tunnel](/postgres/database/tcp-tunnel) to connect to your Prisma Postgres instance.

You'll need the Prisma Postgres connection URL from [step 1](/getting-started/prisma-postgres/import-from-existing-database-mysql#1-create-a-new-prisma-postgres-database):

Expand Down Expand Up @@ -72,7 +72,7 @@ npx @prisma/ppg-tunnel --host 127.0.0.1 --port 5433

:::note

You can [specify a different host and port](/postgres/tcp-tunnel#customizing-host-and-port) by providing your own host and port values using the `--port` and `--host` flags. Just be sure to use the same host and port values consistently throughout the guide.
You can [specify a different host and port](/postgres/database/tcp-tunnel#customizing-host-and-port) by providing your own host and port values using the `--port` and `--host` flags. Just be sure to use the same host and port values consistently throughout the guide.

:::

Expand Down Expand Up @@ -177,7 +177,7 @@ If you see output like this, it means your data has been successfully exported t

:::note

You also can use [Prisma Studio](/postgres/tooling#viewing-and-editing-data-in-prisma-studio) and verify whether the migration was successful:
You also can use [Prisma Studio](/postgres/database/tooling#viewing-and-editing-data-in-prisma-studio) and verify whether the migration was successful:

```terminal
npx prisma studio
Expand Down
2 changes: 1 addition & 1 deletion content/200-orm/500-reference/200-prisma-cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ You can find the complete list of available commands with the arguments [here](/

### `mcp`

Starts the [Prisma MCP server](/postgres/mcp-server).
Starts the [Prisma MCP server](/postgres/integrations/mcp-server).

## Studio

Expand Down
6 changes: 3 additions & 3 deletions content/200-orm/500-reference/250-error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,13 @@ The included usage of the current plan has been exceeded. This can only occur on

#### `P6004` (`QueryTimeout`)

The global timeout of Accelerate has been exceeded. You can find the limit [here](/accelerate/connection-pooling#query-timeout-limit).
The global timeout of Accelerate has been exceeded. You can find the limit [here](/postgres/database/connection-pooling#query-timeout-limit).

> Also see the [troubleshooting guide](/accelerate/troubleshoot#p6004-querytimeout) for more information.

#### `P6005` (`InvalidParameters`)

The user supplied invalid parameters. Currently only relevant for transaction methods. For example, setting a timeout that is too high. You can find the limit [here](/accelerate/connection-pooling#interactive-transactions-query-timeout-limit).
The user supplied invalid parameters. Currently only relevant for transaction methods. For example, setting a timeout that is too high. You can find the limit [here](/postgres/database/connection-pooling#interactive-transactions-query-timeout-limit).

#### `P6006` (`VersionNotSupported`)

Expand All @@ -492,7 +492,7 @@ The engine failed to start. For example, it couldn't establish a connection to t

#### `P6009` (`ResponseSizeLimitExceeded`)

The global response size limit of Accelerate has been exceeded. You can find the limit [here](/accelerate/connection-pooling#response-size-limit).
The global response size limit of Accelerate has been exceeded. You can find the limit [here](/postgres/database/connection-pooling#response-size-limit).

> Also see the [troubleshooting guide](/accelerate/troubleshoot#p6009-responsesizelimitexceeded) for more information.

Expand Down
2 changes: 1 addition & 1 deletion content/200-orm/800-more/350-ai-tools/100-cursor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ While this guide is focused on Cursor, these patterns should work with any AI ed

## Prisma MCP server

Prisma provides its own [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that lets you manage Prisma Postgres databases, model database schemas and chat through migrations. Learn more about how you can add it to Cursor [here](/postgres/mcp-server#cursor).
Prisma provides its own [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that lets you manage Prisma Postgres databases, model database schemas and chat through migrations. Learn more about how you can add it to Cursor [here](/postgres/integrations/mcp-server#cursor).

## Defining project-specific rules with `.cursorrules`

Expand Down
2 changes: 1 addition & 1 deletion content/200-orm/800-more/350-ai-tools/300-windsurf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ While this guide is focused on Windsurf, these patterns should work with any AI

## Prisma MCP server

Prisma provides its own [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that lets you manage Prisma Postgres databases, model database schemas, and even chat through migrations. Learn more about how you can add it to Windsurf [here](/postgres/mcp-server#windsurf).
Prisma provides its own [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that lets you manage Prisma Postgres databases, model database schemas, and even chat through migrations. Learn more about how you can add it to Windsurf [here](/postgres/integrations/mcp-server#windsurf).

## Defining project-specific rules with `.windsurfrules`

Expand Down
2 changes: 1 addition & 1 deletion content/200-orm/800-more/350-ai-tools/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ This will generate a Prisma schema based on the prompt and deploy it to a fresh

## Prisma MCP server

Prisma provides its own [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that lets you manage Prisma Postgres databases, model database schemas and chat through migrations. Learn more about it [here](/postgres/mcp-server).
Prisma provides its own [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that lets you manage Prisma Postgres databases, model database schemas and chat through migrations. Learn more about it [here](/postgres/integrations/mcp-server).
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ tocDepth: 3
toc: true
---


[Prisma Postgres](https://www.prisma.io/postgres?utm_source=docs) is a managed PostgreSQL database service that easily lets you create a new database, interact with it through Prisma ORM, and build applications that start small and cheap but can scale to millions of users.

It supports the following workflows:
Expand Down
5 changes: 5 additions & 0 deletions content/250-postgres/100-introduction/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Introduction",
"collapsible": false,
"collapsed": false
}
13 changes: 13 additions & 0 deletions content/250-postgres/100-introduction/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: 'Introduction'
metaTitle: 'Prisma Postgres introduction'
metaDescription: 'Understand the basics of Prisma Postgres, including key features and how to get started.'
hide_table_of_contents: true
---


Get familiar with Prisma Postgres and its core concepts. This section covers what Prisma Postgres is and how to begin using it with minimal setup.

## In this section

<Subsections />
35 changes: 0 additions & 35 deletions content/250-postgres/1000-faq.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions content/250-postgres/1100-integrations/100-netlify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ tocDepth: 3
toc: true
---


## Overview

The [Netlify extension for Prisma Postgres](https://www.netlify.com/integrations/prisma) connects your Netlify sites with Prisma Postgres instances. Once connected, the extension will automatically set the `DATABASE_URL` environment variable on your deployed Netlify sites.

## Features
Expand Down
2 changes: 0 additions & 2 deletions content/250-postgres/1100-integrations/200-vercel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ tocDepth: 3
toc: true
---



The [Vercel Marketplace integration for Prisma Postgres](https://www.vercel.com/marketplace/prisma) connects your Vercel projects with Prisma Postgres instances. Once connected, the integration will automatically set the `DATABASE_URL` environment variable on your deployed Vercel app.

## Features
Expand Down
3 changes: 0 additions & 3 deletions content/250-postgres/1100-integrations/300-idx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ tocDepth: 3
toc: true
---


## Overview

If you want to explore Prisma Postgres without leaving your browser, you can try it out the via Google's [Firebase Studio](https://studio.firebase.google.com/), a fully-fledged online IDE:

1. Open the [**Prisma**](https://pris.ly/idx-starter) template.
Expand Down
5 changes: 2 additions & 3 deletions content/250-postgres/1100-integrations/index.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
title: 'Integrations'
metaTitle: '3rd-Party Integrations for Prisma Postgres'
metaDescription: 'Learn about 3rd-party integrations to use Prisma Postgres, like Netlify, Vercel and Firebase Studio...'
metaDescription: 'Discover how to use Prisma Postgres with 3rd-party platforms like Vercel, Netlify, and Firebase Studio.'
hide_table_of_contents: true
---


Learn how to use Prisma Postgres via 3rd party integrations.
Learn how Prisma Postgres works with popular 3rd-party platforms such as Vercel, Netlify, and Firebase Studio.

## In this section

Expand Down
Loading
Loading