Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ This guides teaches you how to add connection pooling to a PostgreSQL database h

Prisma Accelerate is a robust and mature connection pooler enabling your database to function properly during traffic spikes and high load scenarios. Check out this [video](https://www.youtube.com/watch?v=cnL75if6Aq0) demonstrating how it performs in a load test or [learn why connection pooling is important](https://www.prisma.io/blog/saving-black-friday-with-connection-pooling).

<Youtube videoId="cVB7Bv0T16M" title="Set up Supabase with Prisma Accelerate connection pooling" />

## Prerequisites

To successfully complete this guide, you need **a connection string for a PostgreSQL instance hosted on Supabase**. It typically looks similar to this:
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/content/docs/guides/runtimes/bun.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ metaDescription: Learn how to use Prisma ORM in a Bun application with Prisma Po

[Bun](https://bun.sh) is a fast JavaScript runtime that includes a bundler, test runner, and package manager. In this guide, you will set up a Bun project with Prisma ORM and a Prisma Postgres database. You will create a simple HTTP server and build a Bun executable for deployment.

<Youtube videoId="gE6l4eX0v_I" title="How to use Prisma ORM with Bun and Prisma Postgres" />

## Prerequisites

- [Bun](https://bun.sh/docs/installation) installed in your system
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/content/docs/guides/runtimes/deno.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metaDescription: Learn how to use Prisma ORM in a Deno application with Prisma P

[Deno](https://deno.com) is a secure JavaScript and TypeScript runtime built on V8 with built-in TypeScript support, a permissions system, and web-standard APIs. In this guide, you will set up a Deno project with Prisma ORM and a Prisma Postgres database. You will create a simple HTTP server that reads from the database and returns the results.

<Youtube videoId="hAL2J3yQf7I" title="How to use Prisma ORM with Deno and Prisma Postgres" />

## Prerequisites

- [Deno](https://docs.deno.com/runtime/#install-deno) v2.0 or later installed on your system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Seeding allows you to consistently re-create the same data in your database and
- Populate your database with data that is required for your application to start, such as a default language or currency.
- Provide basic data for validating and using your application in a development environment. This is particularly useful if you are using Prisma Migrate, which sometimes requires resetting your development database.

<Accordions>
<Accordion title="Watch video: Seeding your database">
<Youtube videoId="mulzjQ4pZaA" title="How to seed your database with Prisma ORM" />
</Accordion>
</Accordions>

## How to seed your database in Prisma ORM

Prisma ORM's integrated seeding functionality expects a command in the `"seed"` key in the `migrations` object of your `prisma.config.ts`. This can be any command, `prisma db seed` will just execute it. In this guide and as a default, we recommend writing a seed script inside your project's `prisma/` folder and starting it with the command.
Expand Down
10 changes: 9 additions & 1 deletion apps/docs/content/docs/orm/prisma-schema/overview/location.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ Run prisma generate to generate Prisma Client.

## Multi-file Prisma schema

<Accordions>
<Accordion title="Watch video: Multi-file Prisma schema">
<Youtube
videoId="yGgoP2KK8Bo"
title="How to organize and use a multi-file Prisma schema"
/>
</Accordion>
</Accordions>

If you prefer splitting your Prisma schema into multiple files, you can have a setup that looks as follows:

```
Expand All @@ -60,7 +69,6 @@ prisma/
└── schema.prisma
```


### Usage

When using a multi-file Prisma schema, you must always explicitly specify the location of the directory that contains your schema files (including the main `schema.prisma` file with your `generator` block).
Expand Down
19 changes: 19 additions & 0 deletions apps/docs/src/components/youtube.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type YoutubeProps = {
videoId: string;
title?: string;
};

export const Youtube = ({ videoId, title = "YouTube video player" }: YoutubeProps) => {
return (
<iframe
src={`https://www.youtube.com/embed/${videoId}`}
width="100%"
style={{ aspectRatio: 16 / 9 }}
loading="lazy"
referrerPolicy="strict-origin-when-cross-origin"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing web-share from the allow attribute — share button won't work.

YouTube's own embed snippet uses allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share". The omission of web-share disables the Web Share API inside the player, so the in-player share button silently fails.

🐛 Proposed fix
-      allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+      allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/src/components/youtube.tsx` at line 14, The YouTube embed is
missing "web-share" in the iframe's allow attribute, which prevents the
in-player share button from working; update the allow string in the YouTube
embed (the allow attribute in apps/docs/src/components/youtube.tsx) to include
"web-share" alongside the existing tokens (e.g., "accelerometer; autoplay;
clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share") so
the Web Share API is enabled inside the player.

allowFullScreen
title={title}
/>
);
};
7 changes: 3 additions & 4 deletions apps/docs/src/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import defaultMdxComponents from "fumadocs-ui/mdx";
import { APIPage } from "@/components/api-page";
import { Youtube } from "@/components/youtube";
import { withDocsBasePath } from "@/lib/urls";

import type { MDXComponents } from "mdx/types";
Expand Down Expand Up @@ -56,11 +57,9 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
Accordion,
Accordions,
APIPage,
Youtube,
img: (props: any) => (
<ImageZoom
{...(props as any)}
src={withDocsBasePathForImageSrc((props as any).src)}
/>
<ImageZoom {...(props as any)} src={withDocsBasePathForImageSrc((props as any).src)} />
),
input: (props: any) => <Input {...props} />,
};
Expand Down
Loading