diff --git a/.claude/skills/README.md b/.claude/skills/README.md index a72bd33f52..f0e9c004c9 100644 --- a/.claude/skills/README.md +++ b/.claude/skills/README.md @@ -17,6 +17,7 @@ A skill is a folder with a `SKILL.md` (the instructions) and sometimes `referenc | [`content-create-hero-image`](content-create-hero-image/SKILL.md) | Generate a post's hero (SVG) and social/OG image (PNG) in the Eclipse house style | "Create a cover image for my Compute post" | | [`docs-writer`](docs-writer/README.md) | Write or rewrite developer docs (how-to, concept, reference) | "Write a how-to for deploying to Prisma Compute" | | [`docs-reader-review`](docs-reader-review/SKILL.md) | Check a written page reads for an ordinary user: banned-jargon, staccato, and AI-signs checks, then a fresh reviewer reads it cold and marks what it cannot follow | "Reader review this page" | +| [`docs-reader-review/scripts/check-ai-signs.sh`](docs-reader-review/scripts/check-ai-signs.sh) | Runs in CI (`docs-prose.yml`) on every hand-written docs page a pull request adds or changes (the generated ORM and CLI error-reference pages are skipped; their text is fixed upstream); its word list is dated in `references/ai-writing-signs.md` and needs re-checking against Wikipedia's [Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) about every six months | "Update the AI-signs word list" | | [`docs-agent-ready`](docs-agent-ready/SKILL.md) | Hold the docs' agent-readiness invariants (llms.txt budgets, coverage, skill/MCP endpoints) when editing them | "Add a new docs section to llms.txt" | --- diff --git a/.claude/skills/docs-reader-review/references/ai-writing-signs.md b/.claude/skills/docs-reader-review/references/ai-writing-signs.md index ab53135b10..25f036037b 100644 --- a/.claude/skills/docs-reader-review/references/ai-writing-signs.md +++ b/.claude/skills/docs-reader-review/references/ai-writing-signs.md @@ -32,7 +32,9 @@ Words that models use far more often than people do. Each row gives the plain re | authored, relocated, attempted, passed away, commenced, terminated | wrote, moved, tried, died, started, stopped | | in order to, as a result of, the fact that, a part of, all of the | to, because, that, part of, all the | -Wikipedia notes that the over-used words change with each model generation, so this table is a snapshot. When a reviewer flags a word that reads as machine-made and it is not here, add it. +Wikipedia notes that the over-used words change with each model generation, so this table is a snapshot. When a reviewer flags a word that reads as machine-made and it is not here, add it here and to the `vocab` pattern in `scripts/check-ai-signs.sh`. + +**Last reconciled with the Wikipedia page: 2026-09-16.** The page's "High density of AI vocabulary" section lists which words belong to which model generation and retires words that fall out of use. Re-read that section whenever a new model generation is in wide use (roughly every six months), update this table and the checker, and bump this date. The `docs-prose` workflow runs the checker on every hand-written docs page a pull request adds or changes (the generated ORM and CLI error-reference pages are skipped, because their text is fixed upstream), so a stale list means stale enforcement. ## Sentence shapes diff --git a/.claude/skills/docs-reader-review/scripts/check-ai-signs.sh b/.claude/skills/docs-reader-review/scripts/check-ai-signs.sh index 8a9897dfe7..e0510d6420 100755 --- a/.claude/skills/docs-reader-review/scripts/check-ai-signs.sh +++ b/.claude/skills/docs-reader-review/scripts/check-ai-signs.sh @@ -16,7 +16,7 @@ set -u # Apostrophe in "it's", "isn't", "here's": straight or curly, as a literal alternation so it # matches under a C locale too, where "." is a single byte and would never match a three-byte ’. q="('|’)" -vocab="\b(additionally|moreover|furthermore),|\b(crucial|pivotal|robust|seamless(ly)?|leverag(e|es|ed|ing)|utiliz(e|es|ed|ing)|enhanc(e|es|ed|ing)|bolster(s|ed|ing)?|foster(s|ed|ing)?|cultivat(e|es|ed|ing)|empower(s|ed|ing)?|showcas(e|es|ed|ing)|underscor(e|es|ed|ing)|delv(e|es|ed|ing)|deep dive|tapestry|testament to|vibrant|intricate|nuanced|streamlined|cutting-edge|groundbreaking|garner(s|ed)?|boasts?|interplay|synergy|paradigm|meticulous(ly)?|thoughtfully|invaluable|game-chang(er|ing))\b|\b(in today${q}s world|in the modern era|ever-evolving|the landscape of|the realm of)\b|\b(align|aligns|aligned|resonate|resonates) with\b" +vocab="\b(additionally|moreover|furthermore),|\b(crucial|pivotal|robust|seamless(ly)?|leverag(e|es|ed|ing)|utiliz(e|es|ed|ing)|enhanc(e|es|ed|ing)|bolster(s|ed|ing)?|foster(s|ed|ing)?|cultivat(e|es|ed|ing)|empower(s|ed|ing)?|showcas(e|es|ed|ing)|underscor(e|es|ed|ing) (the|its|how|why|what|a|an)|delv(e|es|ed|ing)|deep dive|tapestry|testament to|vibrant|intricate|nuanced|streamlined|cutting-edge|groundbreaking|garner(s|ed)?|boasts?|interplay|synergy|paradigm|meticulous(ly)?|thoughtfully|invaluable|game-chang(er|ing))\b|\b(in today${q}s world|in the modern era|ever-evolving|the landscape of|the realm of)\b|\b(align|aligns|aligned|resonate|resonates) with\b" shapes="\b(serves?|acts?|functions?|stands?) as an?\b|\bnot (just|only|merely) [^.]{1,60}\bbut( also)?\b|\bisn${q}t [^.]{1,40}, it${q}s\b|\b(is|are|was|were|has been|have been) (closely |directly )?associated with\b|\bin connection with\b|\b(it${q}s|it is) (important|worth|crucial|essential|critical) (to note|noting|to remember|to consider|to keep in mind)\b|\bworth noting\b|\bkeep in mind that\b|\b(in summary|in conclusion|to recap|to sum up|overall),|\bdespite (these|its|their) (challenges|limitations|advantages)\b|\bfaces? (several|numerous|many|a number of) challenges\b|\b(many|most) (developers|teams|users|engineers) (find|agree|prefer|consider)\b|\b(it is|it${q}s) widely (considered|regarded|accepted)\b|\bexperts (recommend|agree|suggest)\b|\bbest practices? (suggests?|dictates?|recommends?)\b" leaked="\bi hope this helps\b|\blet me know if\b|\bwould you like me to\b|\bcertainly!|\bhere${q}s an? (breakdown|overview|summary) of\b|\bbelow is an? (breakdown|overview|summary)\b|\bin this (section|guide|article|post),? we (will|${q}ll)\b|\bthis (document|page|guide|article) aims to\b|\bas mentioned (above|earlier|previously)\b|\[(your name|link to [^]]*|insert [^]]*)\]|\bINSERT_[A-Z_]+\b|\b20[0-9]{2}-(xx|XX)-(xx|XX)\b|\bbased on (the )?available (information|sources)\b|\bnot (widely|extensively|well) (documented|available|known)\b|\bas of my last\b|\bas an ai\b" # Literal alternation, not a bracket expression: under a C locale grep matches bracket members diff --git a/.github/workflows/docs-prose.yml b/.github/workflows/docs-prose.yml new file mode 100644 index 0000000000..ebfa2adab3 --- /dev/null +++ b/.github/workflows/docs-prose.yml @@ -0,0 +1,37 @@ +name: Docs Prose + +# Runs the AI-signs prose checker from .claude/skills/docs-reader-review over +# every docs page a pull request adds or changes. The generated error-reference +# pages are skipped: their text comes from prisma/prisma and prisma/prisma-cli, +# so the fix for a hit there is upstream. + +on: + pull_request: + paths: + - "apps/docs/content/docs/**/*.mdx" + - ".claude/skills/docs-reader-review/**" + - ".github/workflows/docs-prose.yml" + +permissions: + contents: read + +jobs: + prose: + name: Check docs prose for signs of AI writing + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Run the checker on changed pages + env: + BASE: ${{ github.event.pull_request.base.sha }} + run: | + mapfile -t pages < <(git diff --name-only --diff-filter=AMR "$BASE"...HEAD -- 'apps/docs/content/docs/**/*.mdx' \ + | grep -v -E '^apps/docs/content/docs/(orm/reference|cli)/error-reference\.mdx$' || true) + if [[ ${#pages[@]} -eq 0 ]]; then echo "No docs pages changed"; exit 0; fi + printf '%s\n' "${pages[@]}" + .claude/skills/docs-reader-review/scripts/check-ai-signs.sh "${pages[@]}" diff --git a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx index 2536a238fa..39177369c4 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx @@ -115,7 +115,7 @@ Run: npx prisma@latest contract emit ``` -This refreshes `src/prisma/contract.json` and `src/prisma/contract.d.ts` so the runtime and query APIs are aligned with the contract you just reviewed. +This refreshes `src/prisma/contract.json` and `src/prisma/contract.d.ts` so the runtime and query APIs match the contract you just reviewed. ## 6. Run a simple high-level query diff --git a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx index b1e3ba9265..6c6b9e0048 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx @@ -102,7 +102,7 @@ After you are happy with the contract, run: npx prisma@latest contract emit ``` -This refreshes `src/prisma/contract.json` and `src/prisma/contract.d.ts` so the runtime and query APIs are aligned with the contract you just reviewed. +This refreshes `src/prisma/contract.json` and `src/prisma/contract.d.ts` so the runtime and query APIs match the contract you just reviewed. ## 6. Sign the database diff --git a/apps/docs/content/docs/accelerate/evaluating.mdx b/apps/docs/content/docs/accelerate/evaluating.mdx index 336dfb84b4..0ae38ef169 100644 --- a/apps/docs/content/docs/accelerate/evaluating.mdx +++ b/apps/docs/content/docs/accelerate/evaluating.mdx @@ -12,13 +12,13 @@ Evaluate Accelerate with high volume to see how it performs under load. ## How Accelerate's connection pool optimizes performance under load -Prisma Accelerate employs a dynamic, serverless connection pooling infrastructure. When a request is made, a connection pool is quickly provisioned for the project in the region assigned while configuring Prisma Accelerate. This connection pool remains active, serving many additional requests while reusing established database connections. The connection pool will disconnect after a period of inactivity, so it’s important to evaluate Prisma Accelerate with a consistent stream of traffic. +Prisma Accelerate employs a dynamic, serverless connection pooling infrastructure. When a request is made, a connection pool is quickly provisioned for the project in the region assigned while configuring Prisma Accelerate. This connection pool remains active, serving many additional requests while reusing established database connections. The connection pool will disconnect after a period of inactivity, so it's important to evaluate Prisma Accelerate with a consistent stream of traffic. **Key Benefits:** - **Optimized Query Performance:** The serverless connection pooler adapts to the query load, ensuring the database connections are managed efficiently during peak demand. - > Prisma Accelerate’s connection pooler cannot improve the performance of queries in the database. In scenarios where query performance is an issue, we recommend optimizing the Prisma query, applying indexes, or utilizing Accelerate’s edge caching. + > Prisma Accelerate's connection pooler cannot improve the performance of queries in the database. In scenarios where query performance is an issue, we recommend optimizing the Prisma query, applying indexes, or using Accelerate's edge caching. - **Maximize Connection Reuse:** Executing a consistent volume of queries helps maintain active instances of Accelerate connection poolers. This increases connection reuse, ensuring faster response times for subsequent queries. @@ -124,9 +124,9 @@ main() ## Evaluating Prisma Accelerate caching performance -Prisma Accelerate’s edge cache is also optimized for a high volume of queries. The cache automatically optimizes for repeated queries. As a result, the cache hit rate will increase as the query frequency does. Adding a query result to the cache is also non-blocking, so a short burst of queries might not utilize the cache or a sustained load. +Prisma Accelerate's edge cache is also optimized for a high volume of queries. The cache automatically optimizes for repeated queries. As a result, the cache hit rate will increase as the query frequency does. Adding a query result to the cache is also non-blocking, so a short burst of queries might not hit the cache the way a sustained load does. -To evaluate Accelerate’s edge caching, you can modify the above script with the below: +To evaluate Accelerate's edge caching, modify the script above as follows: ```typescript import { PrismaClient } from "@prisma/client"; diff --git a/apps/docs/content/docs/accelerate/getting-started.mdx b/apps/docs/content/docs/accelerate/getting-started.mdx index d9611e2d53..47008eeb3c 100644 --- a/apps/docs/content/docs/accelerate/getting-started.mdx +++ b/apps/docs/content/docs/accelerate/getting-started.mdx @@ -195,7 +195,7 @@ As of Prisma version `5.2.0` you can use Prisma Studio with the Accelerate conne If your application requires real-time or near-real-time data, cache invalidation ensures that users see the most current data, even when using a large `ttl` (Time-To-Live) or `swr` (Stale-While-Revalidate) [cache strategy](/accelerate/caching). By invalidating your cache, you can bypass extended caching periods to show live data whenever it's needed. -For example, if a dashboard displays customer information and a customer’s contact details change, cache invalidation allows you to refresh only that data instantly, ensuring support staff always see the latest information without waiting for the cache to expire. +For example, if a dashboard displays customer information and a customer's contact details change, cache invalidation allows you to refresh only that data instantly, ensuring support staff always see the latest information without waiting for the cache to expire. To invalidate a cached query result, you can add tags and then use the `$accelerate.invalidate` API. diff --git a/apps/docs/content/docs/accelerate/local-development.mdx b/apps/docs/content/docs/accelerate/local-development.mdx index 6575de075a..c5f305219e 100644 --- a/apps/docs/content/docs/accelerate/local-development.mdx +++ b/apps/docs/content/docs/accelerate/local-development.mdx @@ -8,7 +8,7 @@ metaDescription: Learn how to use Prisma Accelerate in a development environment Prisma Accelerate provides connection pooling and a global database cache for production traffic. -In development environments, you may want to use a local database to minimize expenses. Furthermore, you may consider extending Prisma Client with the Accelerate client extension once so that you can use a local database in development and a hosted database with Accelerate’s connection pooling and caching enabled. This eliminates the need for conditional logic to switch clients between development and production. +In development environments, you may want to use a local database to minimize expenses. You may also consider extending Prisma Client with the Accelerate client extension once so that you can use a local database in development and a hosted database with Accelerate's connection pooling and caching enabled. This eliminates the need for conditional logic to switch clients between development and production. This guide will explain how to use Prisma Accelerate client extension in a development environment with a local database. diff --git a/apps/docs/content/docs/accelerate/more/faq.mdx b/apps/docs/content/docs/accelerate/more/faq.mdx index d716c15943..f9754f1ae3 100644 --- a/apps/docs/content/docs/accelerate/more/faq.mdx +++ b/apps/docs/content/docs/accelerate/more/faq.mdx @@ -116,17 +116,17 @@ No. We currently do not have any plans for supporting other ORMs/query builders The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, items within the cache may be evicted if they are not frequently accessed. -Based on our experimentation, we’ve seen cache items persist for around 18 hours. While items may remain in the cache for an extended period if they are actively accessed, there is no guarantee. +Based on our experimentation, we've seen cache items persist for around 18 hours. While items may remain in the cache for an extended period if they are actively accessed, there is no guarantee. > **Note**: Even frequently accessed items may occasionally be evicted from the cache. It's unlikely for an item to survive for up to or longer than a month, regardless of its activity level. -## Why doesn’t Accelerate fall back to the direct connection string during a service disruption? +## Why doesn't Accelerate fall back to the direct connection string during a service disruption? In the rare event of a service disruption, falling back to a direct connection would bypass the connection pool. This could potentially deplete the database's available connections and cause other issues on the database level. If there is a service disruption, it's recommended to verify on the [status page](https://pris.ly/data-platform-status). You can reach out to one of Prisma's [support channels](/console/more/support) for assistance. -> **Note:** Additionally, it's worth noting that some edge function runtime environments may not support direct connections with Prisma ORM. For further details, refer to our [Edge functions documentation](/orm/v7/prisma-client/deployment/edge/overview). +> **Note:** Some edge function runtime environments may not support direct connections with Prisma ORM. For further details, refer to our [Edge functions documentation](/orm/v7/prisma-client/deployment/edge/overview). ## Are each of the queries within an interactive transaction counted separately for billing? @@ -184,11 +184,11 @@ Here is a [demo app](https://pris.ly/test-cache-invalidation) to test the time i ## When should I use the cache invalidate API? -The [cache invalidate API](/accelerate/caching) is essential when data consistency cannot wait for the cache’s standard expiration or revalidation. Key use cases include: +The [cache invalidate API](/accelerate/caching) is essential when data consistency cannot wait for the cache's standard expiration or revalidation. Key use cases include: - **Content updates**: When critical changes occur, such as edits to a published article, product updates, or profile modifications, that need to be visible immediately. - **Inventory management**: In real-time applications, like inventory or booking systems, where stock levels, availability, or reservation statuses must reflect the latest information. -- **High-priority data**: For time-sensitive data, like breaking news or urgent notifications, where it’s essential for users to see the most current information right away. +- **High-priority data**: For time-sensitive data, like breaking news or urgent notifications, where it's essential for users to see the most current information right away. ## How does Accelerate count queries for billing? @@ -200,7 +200,7 @@ Queries are counted regardless of whether they are served from the cache or the If you previously signed up using GitHub and want to switch to email and password login, follow these steps: -### 1. Verify Your GitHub Email Address +### 1. Verify your GitHub email address - Check the primary email address associated with your GitHub account (e.g., from your GitHub profile or notification settings). @@ -210,7 +210,7 @@ If you previously signed up using GitHub and want to switch to email and passwor - Use the **same email address** linked to your GitHub account to create the new account. - Our system will automatically connect your new email/password account to your existing data. -### 3. Test Your Login +### 3. Test your login - Log out and try logging in with your email and the password you just created. diff --git a/apps/docs/content/docs/accelerate/more/known-limitations.mdx b/apps/docs/content/docs/accelerate/more/known-limitations.mdx index e6a6c1d34f..2adfb92963 100644 --- a/apps/docs/content/docs/accelerate/more/known-limitations.mdx +++ b/apps/docs/content/docs/accelerate/more/known-limitations.mdx @@ -39,4 +39,4 @@ Accelerate does not support direct IPv4 addresses in MongoDB connection strings. - **IPv4 connection string** (not supported): `mongodb://user:password@192.168.1.100:27017/db_name` - **DNS record connection string** (supported): `mongodb://user:password@my-database.example.com:27017/db_name` -For additional details on Accelerate’s IPv6-first design, refer to our [blog post](https://www.prisma.io/blog/accelerate-ipv6-first). +For additional details on Accelerate's IPv6-first design, refer to our [blog post](https://www.prisma.io/blog/accelerate-ipv6-first). diff --git a/apps/docs/content/docs/accelerate/more/troubleshoot.mdx b/apps/docs/content/docs/accelerate/more/troubleshoot.mdx index 484bb0f540..aca52ee22f 100644 --- a/apps/docs/content/docs/accelerate/more/troubleshoot.mdx +++ b/apps/docs/content/docs/accelerate/more/troubleshoot.mdx @@ -26,7 +26,7 @@ This error may arise if images or files stored within your table are being fetch In certain cases, a large number of records or fields are unintentionally fetched, which results in exceeding the configured query response size limit. This could happen when the [`where`](/orm/v7/reference/prisma-client-reference#where) clause in the query is incorrect or entirely missing. -**Suggested solution:** Configure the query response size limit to be larger. If the limit is still exceeded, double-check that the `where` clause is filtering data as expected. To prevent fetching too many records, consider using [pagination](/orm/v7/prisma-client/queries/pagination). Additionally, use the [`select`](/orm/v7/reference/prisma-client-reference#select) clause to return only the necessary fields, reducing the response size. +**Suggested solution:** Configure the query response size limit to be larger. If the limit is still exceeded, double-check that the `where` clause is filtering data as expected. To prevent fetching too many records, consider using [pagination](/orm/v7/prisma-client/queries/pagination). Use the [`select`](/orm/v7/reference/prisma-client-reference#select) clause to return only the necessary fields, reducing the response size. #### Fetching a large volume of data @@ -50,7 +50,7 @@ This error could be caused by numerous reasons. Some of the prominent ones are: If the application is receiving very high traffic and there are not a sufficient number of connections available to the database, then the queries would need to wait for a connection to become available. This situation can lead to queries waiting longer than the configured query timeout limit for a connection, ultimately triggering a timeout error if they do not get serviced within this duration. -**Suggested solution**: Review and possibly increase the `connection_limit` specified in the connection string parameter when setting up Accelerate in a platform environment. This limit should align with your database's maximum number of connections. +**Suggested solution**: Review and possibly increase the `connection_limit` specified in the connection string parameter when setting up Accelerate in a platform environment. This limit should match your database's maximum number of connections. By default, the connection limit is set to 10 unless a different `connection_limit` is specified in your database connection string. @@ -58,7 +58,7 @@ By default, the connection limit is set to 10 unless a different `connection_lim Queries may be slow to respond, hitting the configured query timeout limit even when connections are available. This could happen if a very large amount of data is being fetched in a single query or if appropriate indexes are missing from the table. -**Suggested solution**: Configure the query timeout limit to be larger. If the limit is exceeded, identify the slow-running queries and fetch only the necessary data. Use the `select` clause to retrieve specific fields and avoid fetching unnecessary data. Additionally, consider adding appropriate indexes to improve query efficiency. You might also isolate long-running queries into separate environments to prevent them from affecting transactional queries. +**Suggested solution**: Configure the query timeout limit to be larger. If the limit is exceeded, identify the slow-running queries and fetch only the necessary data. Use the `select` clause to retrieve specific fields and avoid fetching unnecessary data. Consider adding appropriate indexes to improve query efficiency. You might also isolate long-running queries into separate environments to prevent them from affecting transactional queries. #### Database resource contention @@ -76,11 +76,11 @@ See the [`P6009`](/orm/v7/reference/error-reference#p6009-responsesizelimitexcee For runtimes that support Prisma ORM natively, you could consider creating two `PrismaClient` Instances. One with the Accelerate connection string (prefixed with `prisma://`) and the other one with the direct database connection string (prefixed with `postgres://`, `mysql://` etc). The main idea behind this approach is to bypass Accelerate for certain specific queries. -However, please note that the available connections would be split between both of your `PrismaClient` Instances. It's crucial to understand the implications of managing multiple instances, particularly in regards to direct database connections. Utilizing a `PrismaClient` instance with a direct database connection string means that this connection will interact directly with your database. +However, please note that the available connections would be split between both of your `PrismaClient` Instances. Managing multiple instances has consequences for direct database connections. Using a `PrismaClient` instance with a direct database connection string means that this connection will interact directly with your database. This approach requires careful consideration because the direct connections and those managed by Accelerate share the same underlying database connection pool. This can lead to competition for resources, potentially affecting the performance and availability of your database services. -Additionally, direct connections could have a significant impact on your database's performance and availability. Operations that consume a considerable amount of resources could potentially degrade the service for other users or processes that rely on the same database. +Direct connections can also affect your database's performance and availability. Operations that consume a considerable amount of resources could potentially degrade the service for other users or processes that rely on the same database. If your application's runtime environment supports Prisma ORM natively and you're considering this strategy to circumvent P6009 and P6004 errors, you might create two `PrismaClient` instances: @@ -99,7 +99,7 @@ export const prismaAccelerate = new PrismaClient({ This setup allows you to strategically direct certain operations through the direct connection, mitigating the risk of encountering the aforementioned errors. However, this decision should be made with a comprehensive understanding of the potential consequences and an assessment of whether your database infrastructure can support this additional load without compromising overall performance and availability. -> Also see [**why doesn’t Accelerate fall back to the direct connection string during a service disruption?**](/accelerate/more/faq#why-doesnt-accelerate-fall-back-to-the-direct-connection-string-during-a-service-disruption) +> Also see [**why doesn't Accelerate fall back to the direct connection string during a service disruption?**](/accelerate/more/faq#why-doesnt-accelerate-fall-back-to-the-direct-connection-string-during-a-service-disruption) ## `P6008` (`ConnectionError|EngineStartError`) @@ -117,9 +117,9 @@ If your database is within a VPC or access is limited to specific IP addresses, #### Unreachable Database Host/Port -If the database’s server address (hostname) and port are incorrect or unreachable then you may encounter this error. +If the database's server address (hostname) and port are incorrect or unreachable then you may encounter this error. -**Suggested solution:** Verify the hostname/port of the database connection string that was provided while creating the Prisma Accelerate project. Additionally, attempt to connect to the database using a Database GUI tool (e.g., [Prisma Studio](https://www.prisma.io/studio), [TablePlus](https://tableplus.com/), or [DataGrip](https://www.jetbrains.com/datagrip/)) for further investigation. +**Suggested solution:** Verify the hostname/port of the database connection string that was provided while creating the Prisma Accelerate project. Then try to connect to the database using a Database GUI tool (e.g., [Prisma Studio](https://www.prisma.io/studio), [TablePlus](https://tableplus.com/), or [DataGrip](https://www.jetbrains.com/datagrip/)) for further investigation. #### Incorrect username/password/database name @@ -135,7 +135,7 @@ If the database is taking too long to respond to the connection request, Prisma ## `P5011` (`TooManyRequests`) -This error occurs when Prisma Accelerate detects a high volume of requests that surpasses allowable thresholds. It acts as a protective measure to safeguard both Prisma Accelerate and your underlying database from excessive load. +This error occurs when Prisma Accelerate detects a high volume of requests that surpasses allowable thresholds. This protects both Prisma Accelerate and your underlying database from excessive load. ### Possible causes for `P5011` diff --git a/apps/docs/content/docs/accelerate/reference/api-reference.mdx b/apps/docs/content/docs/accelerate/reference/api-reference.mdx index d85e096910..186b513b48 100644 --- a/apps/docs/content/docs/accelerate/reference/api-reference.mdx +++ b/apps/docs/content/docs/accelerate/reference/api-reference.mdx @@ -30,7 +30,7 @@ The `cacheStrategy` parameter takes an option with the following keys: | ------ | ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `swr` | `60` | `Int` | No | The stale-while-revalidate time in seconds. | | `ttl` | `60` | `Int` | No | The time-to-live time in seconds. | -| `tags` | `["user"]` | `String[]` | No | The `tag` serves as a variable to control the invalidation of specific queries within your application. It is an optional array of strings to [invalidate](/accelerate/reference/api-reference#accelerateinvalidate) the cache, with each tag containing only alphanumeric characters and underscores, and a maximum length of 64 characters. | +| `tags` | `["user"]` | `String[]` | No | The `tag` controls the invalidation of specific queries within your application. It is an optional array of strings to [invalidate](/accelerate/reference/api-reference#accelerateinvalidate) the cache, with each tag containing only alphanumeric characters and underscores, and a maximum length of 64 characters. | | diff --git a/apps/docs/content/docs/ai/tools/cursor.mdx b/apps/docs/content/docs/ai/tools/cursor.mdx index 22276b7b17..d128616bf2 100644 --- a/apps/docs/content/docs/ai/tools/cursor.mdx +++ b/apps/docs/content/docs/ai/tools/cursor.mdx @@ -96,7 +96,7 @@ For a simpler repo-wide setup, you can paste the same guidance into `AGENTS.md`. ## Using Cursor's context-aware capabilities -Cursor's [context-aware](https://docs.cursor.com/context/) capabilities let you add specific websites, files, folders or documentation to enhance its understanding of your project. By adding your `schema.prisma` file as context, you enable Cursor to generate more accurate queries, tests, and seed data based on your database schema. +Cursor's [context-aware](https://docs.cursor.com/context/) capabilities let you add specific websites, files, folders or documentation to improve its understanding of your project. By adding your `schema.prisma` file as context, you enable Cursor to generate more accurate queries, tests, and seed data based on your database schema. ### Add Prisma docs `llm.txt` file as `@Docs` context diff --git a/apps/docs/content/docs/ai/tutorials/linktree-clone.mdx b/apps/docs/content/docs/ai/tutorials/linktree-clone.mdx index 6b96a0ccae..3e95065ba1 100644 --- a/apps/docs/content/docs/ai/tutorials/linktree-clone.mdx +++ b/apps/docs/content/docs/ai/tutorials/linktree-clone.mdx @@ -47,7 +47,7 @@ Use Claude Sonnet 4, Gemini 2.5 Pro, GPT-4o, or a newer model. Older models gene ::: -## 1. Set Up Your Project +## 1. Set up your project Create a new Next.js application: @@ -119,7 +119,7 @@ git commit -m "Add Clerk authentication setup" ``` -## 3. Update Your Database Schema +## 3. Update your database schema Since we're building a Linktree clone, we need to update the database schema to support our specific data model. This includes: @@ -195,7 +195,7 @@ git commit -m "Update schema for Linktree clone" ``` -## 4. Connect Clerk Users to Your Database +## 4. Connect Clerk users to your database When a user signs in with Clerk, they exist in Clerk's system but **not** in your database. To bridge this gap, create a "Claim Username" flow where users pick their unique username (e.g., `yourapp.com/johndoe`) after signing in for the first time. diff --git a/apps/docs/content/docs/ai/tutorials/typefully-clone.mdx b/apps/docs/content/docs/ai/tutorials/typefully-clone.mdx index 1b3da569f4..1df6029ee4 100644 --- a/apps/docs/content/docs/ai/tutorials/typefully-clone.mdx +++ b/apps/docs/content/docs/ai/tutorials/typefully-clone.mdx @@ -104,7 +104,7 @@ This model fits local development: Your local LLM is ready. Ollama runs as a background service, so you don't need to keep a terminal open. -## 2. Create Your Next.js Project +## 2. Create your Next.js project Create a new Next.js application: @@ -208,7 +208,7 @@ git commit -m "Add TweetSmith UI" ``` -## 4. Connect to Your Local LLM +## 4. Connect to your local LLM Wire the UI to your local Ollama instance with a helper file and an API route. @@ -838,7 +838,7 @@ Let users attach an image to their polished tweets. UploadThing handles the file npm install uploadthing @uploadthing/react ``` -### Get Your API Token +### Get your API token 1. Go to [uploadthing.com](https://uploadthing.com) and create an account 2. Create a new app in the dashboard diff --git a/apps/docs/content/docs/cli/db-sign.mdx b/apps/docs/content/docs/cli/db-sign.mdx index 935d934ce8..9aaa958881 100644 --- a/apps/docs/content/docs/cli/db-sign.mdx +++ b/apps/docs/content/docs/cli/db-sign.mdx @@ -6,7 +6,7 @@ metaTitle: db sign | Prisma ORM CLI metaDescription: Learn how to sign a database once it matches the current Prisma ORM contract. --- -`db sign` verifies that the live database satisfies the emitted contract and, if so, writes or updates the database signature. The signature records that this database instance is aligned with a specific contract version. +`db sign` verifies that the live database satisfies the emitted contract and, if so, writes or updates the database signature. The signature records that this database instance matches a specific contract version. It is idempotent and safe to run in CI or a deployment pipeline. Use it after importing or inferring an existing schema, or after a deployment flow that already applied the required database changes. diff --git a/apps/docs/content/docs/console/more/feature-maturity.mdx b/apps/docs/content/docs/console/more/feature-maturity.mdx index 9aae8ef5c7..ecadc16d38 100644 --- a/apps/docs/content/docs/console/more/feature-maturity.mdx +++ b/apps/docs/content/docs/console/more/feature-maturity.mdx @@ -20,7 +20,7 @@ If a feature on the Console is labeled as **Early Access**: - It can still evolve based on feedback from our users, and its API surface won't change drastically as it matures. - We reserve ourselves the right to throttle or remove access to a feature in Early Access to preserve the stability of the platform, or enforce its use to stay within the scope defined in our [Terms of Service](https://pris.ly/terms). -As always, your feedback in our [Discord](https://pris.ly/discord?utm_source=docs&utm_medium=inline_text) is invaluable to shape the design of the features. This will help us ensure that they can solve your problems in the best way possible. +Your feedback in our [Discord](https://pris.ly/discord?utm_source=docs&utm_medium=inline_text) shapes the design of the features. This will help us ensure that they can solve your problems in the best way possible. ## Preview diff --git a/apps/docs/content/docs/console/more/support.mdx b/apps/docs/content/docs/console/more/support.mdx index 02eca1429f..1bc5b51f24 100644 --- a/apps/docs/content/docs/console/more/support.mdx +++ b/apps/docs/content/docs/console/more/support.mdx @@ -7,7 +7,7 @@ metaTitle: 'Console: Support' metaDescription: Find the right support for any Console question. --- -Your feedback is invaluable, and we encourage you to share your experiences with us on [Discord](https://pris.ly/discord?utm_source=docs&utm_medium=intro_text). +Share your experiences with us on [Discord](https://pris.ly/discord?utm_source=docs&utm_medium=intro_text). ## Support diff --git a/apps/docs/content/docs/guides/integrations/datadog.mdx b/apps/docs/content/docs/guides/integrations/datadog.mdx index c5ef3a301b..f32d8fda4d 100644 --- a/apps/docs/content/docs/guides/integrations/datadog.mdx +++ b/apps/docs/content/docs/guides/integrations/datadog.mdx @@ -20,7 +20,7 @@ In this guide, you'll learn how to set up Datadog tracing for a new Prisma proje ### Spans and tracing - **Spans** are the individual operations or units of work within a distributed system or complex application. Each database query, service call, or external request is represented by a span. -- **Tracing** ties these spans together to form a complete, end-to-end picture of a request’s lifecycle. With tracing, you can visualize bottlenecks, identify problematic queries, and pinpoint where errors occur from your queries. +- **Tracing** ties these spans together to form a complete, end-to-end picture of a request's lifecycle. With tracing, you can visualize bottlenecks, identify problematic queries, and pinpoint where errors occur from your queries. ### Datadog and Prisma ORM diff --git a/apps/docs/content/docs/guides/integrations/deno.mdx b/apps/docs/content/docs/guides/integrations/deno.mdx index aac9bf5453..efa8145693 100644 --- a/apps/docs/content/docs/guides/integrations/deno.mdx +++ b/apps/docs/content/docs/guides/integrations/deno.mdx @@ -270,7 +270,7 @@ Each time you refresh the page, a new log entry is created in your database. Now that you have a working Deno app connected to a Prisma Postgres database, you can: -- **Enhance your data model** - Add relationships, validations, and indexes to your Prisma schema +- **Extend your data model** - Add relationships, validations, and indexes to your Prisma schema - **Secure your API** - Implement authentication, rate limiting, and proper error handling - **Improve deployment** - Set up CI/CD, monitoring, and database backups for production diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/v1.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/v1.mdx index 6a5b88cccc..64b36ae33e 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/v1.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/v1.mdx @@ -33,7 +33,7 @@ This guide covers migrating your project from Prisma 1 to Prisma ORM 7, the last - **Removed**: GraphQL API for database - **New**: Type-safe database client - **Improved**: Database introspection and migration tools -- **Enhanced**: Support for more database features and types +- **Improved**: Support for more database features and types ## Migration Strategy diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/v5.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/v5.mdx index 8b31ff7e30..e8858baba8 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/v5.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/v5.mdx @@ -179,7 +179,7 @@ model Post { In the generated types, `Address.user` and `Post.user` would use the same type, `UserRelationFilter`. This is obviously unintended as `Address.user` is nullable while `Post.user` is not. In Prisma ORM 5, the type of `Address.user` would be `UserNullableRelationFilter`, resolving this issue. -If you import generated types in your code, you will need to update instances like this to utilize the new `Nullable` types. +If you import generated types in your code, you will need to update instances like this to use the new `Nullable` types. #### Changes to `UncheckedUpdateManyInput` to avoid name collisions diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx index 308cf98614..bacc0366f1 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx @@ -90,7 +90,7 @@ The older `prisma-client-js` provider will be removed in future releases of Pris the new `prisma-client` provider which uses the new Rust-free client. This will give you faster queries, smaller bundle size, and require less system resources when deployed to your server. -Additionally, the `output` field is now **required** in the generator block. Prisma Client will no longer be generated in `node_modules` by default. You must specify a custom output path. +The `output` field is now **required** in the generator block. Prisma Client will no longer be generated in `node_modules` by default. You must specify a custom output path. ```prisma tab="Before" @@ -141,7 +141,7 @@ export default defineConfig({ ### Driver adapters The way to create a new Prisma Client has changed to require a driver adapter for all databases. -This change aligns with the move to make the main Prisma Client as lean and open as possible. For +This change is part of the move to make the main Prisma Client as lean and open as possible. For instance, if you are using Prisma Postgres, you now need the `@prisma/adapter-pg` adapter. This also means the signature for creating a new Prisma Client has changed slightly: diff --git a/apps/docs/content/docs/local-development/postgres.mdx b/apps/docs/content/docs/local-development/postgres.mdx index d00dcfdbef..26fe24561c 100644 --- a/apps/docs/content/docs/local-development/postgres.mdx +++ b/apps/docs/content/docs/local-development/postgres.mdx @@ -221,7 +221,7 @@ To use it, install the VS Code extension and find the **Prisma logo** in the act ## Manage local Prisma Postgres programmatically -You can start and stop a local Prisma Postgres server from Node.js without invoking the CLI. This uses undocumented, unstable APIs from `@prisma/dev` and may change without notice. Use it at your own risk. It’s especially useful for integration tests that need an ephemeral local database per test or suite. +You can start and stop a local Prisma Postgres server from Node.js without invoking the CLI. This uses undocumented, unstable APIs from `@prisma/dev` and may change without notice. Use it at your own risk. It's especially useful for integration tests that need an ephemeral local database per test or suite. This is a complete runnable example that will print `[{abba: 1}]` when run: diff --git a/apps/docs/content/docs/orm/middleware/how-middleware-works.mdx b/apps/docs/content/docs/orm/middleware/how-middleware-works.mdx index 43050100c7..69c263ab1c 100644 --- a/apps/docs/content/docs/orm/middleware/how-middleware-works.mdx +++ b/apps/docs/content/docs/orm/middleware/how-middleware-works.mdx @@ -40,11 +40,11 @@ The whole model fits in one picture: your app talks to the database, and middlew A middleware implements only the hooks it needs. Which hooks run depends on how the plan is executed, and there are two paths. -**A row query** — anything that returns rows, whether it came from the ORM API or from `runtime.query(plan)` — runs: +**A row query**, anything that returns rows, whether it came from the ORM API or from `runtime.query(plan)`, runs: `beforeCompile` → `beforeQuery` → `interceptQuery` → `onRow` (once per row) → `afterQuery` -**A non-returning write** — a statement run through `runtime.execute(plan)`, which reports affected rows rather than returning them — runs: +**A non-returning write**, a statement run through `runtime.execute(plan)`, which reports affected rows rather than returning them, runs: `beforeCompile` → `beforeExecute` → `interceptExecute` → `afterExecute` diff --git a/apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx b/apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx index 8e1af9d582..71b2870f3f 100644 --- a/apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx +++ b/apps/docs/content/docs/postgres/best-postgres-for-ai-apps.mdx @@ -48,10 +48,10 @@ See [Prisma MCP server](/ai/tools/mcp-server) for setup. | | Prisma Postgres | Neon | Supabase | |---|---|---|---| | **Built-in connection pooling** | Yes, included by default | Yes, PgBouncer-compatible | Yes, Supavisor pooler | -| **Query-level caching** | Yes — global via Accelerate | No native query cache | No native query cache | -| **Serverless / edge driver** | Yes — `@prisma/ppg` | Yes — `@neondatabase/serverless` | Partial, requires configuration | +| **Query-level caching** | Yes, global via Accelerate | No native query cache | No native query cache | +| **Serverless / edge driver** | Yes, `@prisma/ppg` | Yes, `@neondatabase/serverless` | Partial, requires configuration | | **pgvector support** | Yes | Yes | Yes | -| **MCP server** | Yes — official first-party | Yes — Neon MCP server | Yes — Supabase MCP server | +| **MCP server** | Yes, official first-party | Yes, Neon MCP server | Yes, Supabase MCP server | | **Database branching** | No | Yes | Limited | | **Free tier** | Yes | Yes | Yes | diff --git a/apps/docs/content/docs/postgres/database/backups.mdx b/apps/docs/content/docs/postgres/database/backups.mdx index adefb7bac8..5e9e3e031c 100644 --- a/apps/docs/content/docs/postgres/database/backups.mdx +++ b/apps/docs/content/docs/postgres/database/backups.mdx @@ -64,7 +64,7 @@ which pg_restore ``` :::tip -If you installed PostgreSQL but still see a “command not found” error for `pg_dump` or `pg_restore`, ensure your installation directory is in your system’s `PATH` environment variable. +If you installed PostgreSQL but still see a "command not found" error for `pg_dump` or `pg_restore`, ensure your installation directory is in your system's `PATH` environment variable. ::: ### 2. Creating the Backup with `pg_dump` diff --git a/apps/docs/content/docs/postgres/error-reference.mdx b/apps/docs/content/docs/postgres/error-reference.mdx index 62d82fd71c..ef1dda7743 100644 --- a/apps/docs/content/docs/postgres/error-reference.mdx +++ b/apps/docs/content/docs/postgres/error-reference.mdx @@ -28,7 +28,7 @@ This error may arise if images or files stored within your table are being fetch In certain cases, a large number of records or fields are unintentionally fetched, which results in exceeding the configured query response size limit. This could happen when [the `where` clause](/orm/v7/reference/prisma-client-reference#where) in the query is incorrect or entirely missing. -**Suggested solution:** Configure the query response size limit to be larger. If the limit is still exceeded, double-check that the `where` clause is filtering data as expected. To prevent fetching too many records, consider using [pagination](/orm/v7/prisma-client/queries/pagination). Additionally, use the [`select`](/orm/v7/reference/prisma-client-reference#select) clause to return only the necessary fields, reducing the response size. +**Suggested solution:** Configure the query response size limit to be larger. If the limit is still exceeded, double-check that the `where` clause is filtering data as expected. To prevent fetching too many records, consider using [pagination](/orm/v7/prisma-client/queries/pagination). Use the [`select`](/orm/v7/reference/prisma-client-reference#select) clause to return only the necessary fields, reducing the response size. #### Fetching a large volume of data @@ -56,7 +56,7 @@ This error could be caused by numerous reasons. Some of the prominent ones are: If the application is receiving very high traffic and there are not a sufficient number of connections available to the database, then the queries would need to wait for a connection to become available. This situation can lead to queries waiting longer than the configured query timeout limit for a connection, ultimately triggering a timeout error if they do not get serviced within this duration. -**Suggested solution**: Review and possibly increase the `connection_limit` specified in the connection string parameter when setting up Accelerate in a platform environment. This limit should align with your database's maximum number of connections. +**Suggested solution**: Review and possibly increase the `connection_limit` specified in the connection string parameter when setting up Accelerate in a platform environment. This limit should match your database's maximum number of connections. By default, the connection limit is set to 10 unless a different `connection_limit` is specified in your database connection string. @@ -64,7 +64,7 @@ By default, the connection limit is set to 10 unless a different `connection_lim Queries may be slow to respond, hitting the configured query timeout limit even when connections are available. This could happen if a very large amount of data is being fetched in a single query or if appropriate indexes are missing from the table. -**Suggested solution**: Configure the query timeout limit to be larger. If the limit is exceeded, identify the slow-running queries and fetch only the necessary data. Use the `select` clause to retrieve specific fields and avoid fetching unnecessary data. Additionally, consider adding appropriate indexes to improve query efficiency. You might also isolate long-running queries into separate environments to prevent them from affecting transactional queries. +**Suggested solution**: Configure the query timeout limit to be larger. If the limit is exceeded, identify the slow-running queries and fetch only the necessary data. Use the `select` clause to retrieve specific fields and avoid fetching unnecessary data. Consider adding appropriate indexes to improve query efficiency. You might also isolate long-running queries into separate environments to prevent them from affecting transactional queries. #### Database resource contention @@ -88,7 +88,7 @@ See the [`P6008` entry in the Prisma ORM error reference](/orm/v7/reference/erro If the database's server address (hostname) and port are incorrect or unreachable then you may encounter this error. -**Suggested solution:** Verify the hostname/port of the database connection string that was provided while creating the project. Additionally, attempt to connect to the database using a Database GUI tool (e.g., [Prisma Studio](https://www.prisma.io/studio), [TablePlus](https://tableplus.com/), or [DataGrip](https://www.jetbrains.com/datagrip/)) for further investigation. +**Suggested solution:** Verify the hostname/port of the database connection string that was provided while creating the project. Then try to connect to the database using a Database GUI tool (e.g., [Prisma Studio](https://www.prisma.io/studio), [TablePlus](https://tableplus.com/), or [DataGrip](https://www.jetbrains.com/datagrip/)) for further investigation. #### Incorrect username/password/database name @@ -98,7 +98,7 @@ This error can happen when the wrong credentials are provided, preventing it fro ## `P5011` (`TooManyRequests`) -This error occurs when Prisma Postgres detects a high volume of requests that surpasses allowable thresholds. It acts as a protective measure to safeguard both Prisma Postgres and your underlying database from excessive load. +This error occurs when Prisma Postgres detects a high volume of requests that surpasses allowable thresholds. This protects both Prisma Postgres and your underlying database from excessive load. ### Possible causes for `P5011` diff --git a/apps/docs/content/docs/postgres/faq.mdx b/apps/docs/content/docs/postgres/faq.mdx index 20d797f0db..f10ca7b8c1 100644 --- a/apps/docs/content/docs/postgres/faq.mdx +++ b/apps/docs/content/docs/postgres/faq.mdx @@ -282,7 +282,7 @@ This global cache feature may not be a good fit for your app if: The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, items within the cache may be evicted if they are not frequently accessed. -Based on our experimentation, we’ve seen cache items persist for around 18 hours. While items may remain in the cache for an extended period if they are actively accessed, there is no guarantee. +Based on our experimentation, we've seen cache items persist for around 18 hours. While items may remain in the cache for an extended period if they are actively accessed, there is no guarantee. :::note @@ -318,11 +318,11 @@ Here is a [demo app](https://pris.ly/test-cache-invalidation) to test the time i ### When should I use the cache invalidate API? -The [cache invalidate API](/accelerate/caching) is essential when data consistency cannot wait for the cache’s standard expiration or revalidation. Key use cases include: +The [cache invalidate API](/accelerate/caching) is essential when data consistency cannot wait for the cache's standard expiration or revalidation. Key use cases include: - **Content updates**: When critical changes occur, such as edits to a published article, product updates, or profile modifications, that need to be visible immediately. - **Inventory management**: In real-time applications, like inventory or booking systems, where stock levels, availability, or reservation statuses must reflect the latest information. -- **High-priority data**: For time-sensitive data, like breaking news or urgent notifications, where it’s essential for users to see the most current information right away. +- **High-priority data**: For time-sensitive data, like breaking news or urgent notifications, where it's essential for users to see the most current information right away. ## Connection pooling @@ -346,7 +346,7 @@ While you can increase these limits based on your subscription plan, it's _still [Query Insights](/query-insights) is built into Prisma Postgres and helps you identify slow queries, understand their cost, and decide what to fix. -### I only see raw SQL — how do I see my Prisma ORM queries? +### I only see raw SQL. How do I see my Prisma ORM queries? By default, Query Insights shows raw SQL. To also see the Prisma ORM operation that generated each query (model name, action, and query shape), install the `@prisma/sqlcommenter-query-insights` package: @@ -379,7 +379,7 @@ see Prisma ORM queries in Query Insights. Docs: https://www.prisma.io/docs/query ### Does Query Insights alter my queries or schema? -No. Query Insights is read-only — it observes query behavior but does not rewrite queries or modify your Prisma schema. +No. Query Insights is read-only: it observes query behavior but does not rewrite queries or modify your Prisma schema. ### Can I use Query Insights in production? diff --git a/apps/docs/content/docs/postgres/npx-create-db.mdx b/apps/docs/content/docs/postgres/npx-create-db.mdx index 3a257f4541..134a2db38c 100644 --- a/apps/docs/content/docs/postgres/npx-create-db.mdx +++ b/apps/docs/content/docs/postgres/npx-create-db.mdx @@ -134,10 +134,10 @@ To claim your database and make it permanent: 1. Copy the **claim URL** from the CLI output. 2. Open it in your browser and click **Claim database**. -3. Sign in to your [Prisma Data Platform account](https://console.prisma.io/) (or create one if you don’t have it yet). +3. Sign in to your [Prisma Data Platform account](https://console.prisma.io/) (or create one if you don't have it yet). 4. Choose a **Workspace** that has capacity for creating new projects. 5. Click **Authorize Prisma Create DB** to confirm. -6. You’ll be redirected to a success page. Then, click **Go use your database** to view and manage the claimed database in your workspace. +6. You'll be redirected to a success page. Then, click **Go use your database** to view and manage the claimed database in your workspace. When you claim a database: diff --git a/apps/docs/content/docs/postgres/troubleshooting.mdx b/apps/docs/content/docs/postgres/troubleshooting.mdx index c29d0c7566..adebf98097 100644 --- a/apps/docs/content/docs/postgres/troubleshooting.mdx +++ b/apps/docs/content/docs/postgres/troubleshooting.mdx @@ -56,7 +56,7 @@ Your default [workspace](/console/concepts#workspace) project limit has been rea To resolve this issue, consider the following options: -- Configure a different Workspace as your default—one that has available capacity for additional projects. +- Configure a different Workspace as your default, one that has available capacity for additional projects. - Delete unused projects or databases from your current default Workspace to free up space. - Ensure that you are logged into the correct account in the Prisma CLI. For more details on authentication and account management, please refer to the [Prisma CLI documentation](/cli/v7/console). - [Upgrade to a plan](/postgres#billing-and-limits) that supports more projects in your default Workspace. diff --git a/apps/docs/content/docs/studio/getting-started.mdx b/apps/docs/content/docs/studio/getting-started.mdx index 678eb89f5d..4096d902c8 100644 --- a/apps/docs/content/docs/studio/getting-started.mdx +++ b/apps/docs/content/docs/studio/getting-started.mdx @@ -36,7 +36,7 @@ npx prisma studio --url="postgresql://user:password@localhost:5432/yourdb" This is also how you launch Studio for a [Prisma ORM](/orm) project, which has no `schema.prisma` to read. See [Studio with Prisma ORM](/studio/prisma-next). -## Connecting to Your Database +## Connecting to your database 1. **Using environment variables**: Create a `.env` file in your project root with your database URL: diff --git a/apps/docs/content/docs/studio/integrations/embedding.mdx b/apps/docs/content/docs/studio/integrations/embedding.mdx index faaf8646db..9c8d9e0f0d 100644 --- a/apps/docs/content/docs/studio/integrations/embedding.mdx +++ b/apps/docs/content/docs/studio/integrations/embedding.mdx @@ -203,7 +203,7 @@ function App() { ### Custom styling -You can customize the look and feel of Prisma Studio so that it matches your application’s design. This is done by passing a custom theme to the `Studio` component. A theme is a set of CSS variables that define colors, spacing, and other style properties for both light and dark modes. +You can customize the look and feel of Prisma Studio so that it matches your application's design. This is done by passing a custom theme to the `Studio` component. A theme is a set of CSS variables that define colors, spacing, and other style properties for both light and dark modes. Here's an example of applying a custom theme: @@ -258,7 +258,7 @@ With this setup, Studio inherits your custom colors, borders, and typography rul ### Concepts -Here's an overview of the key concepts in your frontend: +The key concepts in your frontend: - **Executor**: The bridge between Studio and your backend, it's created using the `createStudioBFFClient` function - **Adapter**: Handles database-specific query formatting (PostgreSQL, SQLite, or MySQL) @@ -440,7 +440,7 @@ app.post("/studio", async (c) => { ## Execution flow -Here's an overview of the execution flow in your embedded Prisma Studio version: +The execution flow in your embedded Prisma Studio version: ![Diagram showing the execution flow of embedded Prisma Studio: user, Studio UI, React app, backend API, and database.](/img/studio/embedded-flow.png)