Skip to content
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

Pg driver adapter schema #5954

Merged
merged 3 commits into from
Apr 26, 2024
Merged
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 @@ -91,7 +91,7 @@ Notice that this code requires the `DATABASE_URL` environment variable to be set

#### Specifying a PostgreSQL schema

You can specify the https://www.postgresql.org/docs/current/ddl-schemas.html by passing in the `schema` option when instantiating `PrismaPg`:
You can specify a [PostgreSQL schema](https://www.postgresql.org/docs/current/ddl-schemas.html) by passing in the `schema` option when instantiating `PrismaPg`:

```ts
const adapter = new PrismaPg(pool, {
Expand Down
12 changes: 12 additions & 0 deletions content/200-orm/050-overview/500-databases/890-neon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,15 @@ const prisma = new PrismaClient({ adapter })
```

You can then use Prisma Client as you normally would with full type-safety. Prisma Migrate, introspection, and Prisma Studio will continue working as before, using the connection string defined in the Prisma schema.

### Notes

#### Specifying a PostgreSQL schema

You can specify a [PostgreSQL schema](https://www.postgresql.org/docs/current/ddl-schemas.html) by passing in the `schema` option when instantiating `PrismaNeon`:

```ts
const adapter = new PrismaNeon(pool, {
schema: 'myPostgresSchema'
})
```
Loading