Labsco
prisma logo

prisma-database-setup-prisma-postgres

✓ Official8

by prisma · part of prisma/cursor-plugin

Prisma Postgres Setup

🔥🔥🔥✓ VerifiedFreeAdvanced setup
🧩 One of 7 skills in the prisma/cursor-plugin package — works on its own, and pairs well with its siblings.

Prisma Postgres Setup

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.

by prisma

Prisma Postgres Setup npx skills add https://github.com/prisma/cursor-plugin --skill prisma-database-setup-prisma-postgres Download ZIPGitHub8

Overview

Prisma Postgres is a serverless, managed PostgreSQL database optimized for Prisma.

Connection String

The connection string starts with prisma+postgres://.

Copy & paste — that's it
DATABASE_URL="prisma+postgres://[email protected]/env_id"

Driver Adapter (Prisma ORM 7 required)

Prisma ORM 7 uses the query compiler by default, so you must use a driver adapter. For Prisma Postgres, use the Prisma Postgres serverless driver adapter.

Install adapter and driver:

Copy & paste — that's it
npm install @prisma/adapter-ppg @prisma/ppg

Use a direct TCP connection string for the adapter (from the Prisma Console) and instantiate Prisma Client:

Copy & paste — that's it
import 'dotenv/config'
import { PrismaClient } from '../generated/client'
import { PrismaPostgresAdapter } from '@prisma/adapter-ppg'

const prisma = new PrismaClient({
 adapter: new PrismaPostgresAdapter({
 connectionString: process.env.PRISMA_DIRECT_TCP_URL,
 }),
})

Features

  • Serverless: Scales to zero.

  • Caching: Integrated query caching (Accelerate).

  • Real-time: Database events (Pulse).

Using with Prisma Client

Since Prisma ORM 7 requires a driver adapter, use the Prisma Postgres adapter shown above when instantiating Prisma Client.