
Prisma Database Setup Postgresql
- 29 installs
- 8 repo stars
- Updated February 9, 2026
- prisma/cursor-plugin
prisma-database-setup-postgresql configures Prisma 7 PostgreSQL.
About
The prisma-database-setup-postgresql skill configures postgresql datasource, prisma.config.ts DATABASE_URL, generated client output, and required @prisma/adapter-pg PrismaPg adapter for Prisma 7 query compiler mode with connection troubleshooting.
- Prisma 7 schema and prisma.config.ts setup.
- postgresql DATABASE_URL format.
- Required pg driver adapter instantiation.
- Generated client output path.
- Connection troubleshooting tips.
Prisma Database Setup Postgresql by the numbers
- 29 all-time installs (skills.sh)
- Ranked #513 of 911 Databases skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
prisma-database-setup-postgresql capabilities & compatibility
- Capabilities
- postgresql setup steps
- Works with
- postgres
- Use cases
- database
What prisma-database-setup-postgresql says it does
Configure Prisma with PostgreSQL
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-database-setup-postgresqlAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 29 |
|---|---|
| repo stars | ★ 8 |
| Last updated | February 9, 2026 |
| Repository | prisma/cursor-plugin ↗ |
How do I set up Prisma 7 with PostgreSQL?
Configure Prisma ORM 7 PostgreSQL with config file and pg driver adapter.
Who is it for?
Developers initializing Prisma PostgreSQL on v7.
Skip if: Skip for other databases.
When should I use this skill?
Prisma PostgreSQL setup or connection errors.
What you get
PrismaClient with pg adapter configured.
Files
PostgreSQL Setup
Configure Prisma with PostgreSQL.
Prerequisites
- PostgreSQL database (local or cloud)
- Connection string
1. Schema Configuration
In prisma/schema.prisma:
datasource db {
provider = "postgresql"
}
generator client {
provider = "prisma-client"
output = "../generated"
}2. Config Configuration (v7)
In prisma.config.ts:
import { defineConfig, env } from 'prisma/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
datasource: {
url: env('DATABASE_URL'),
},
})3. Environment Variable
In .env:
DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public"Connection String Format
postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=SCHEMA- USER: Database user
- PASSWORD: Password (URL encoded if special chars)
- HOST: Hostname (localhost, IP, or domain)
- PORT: Port (default 5432)
- DATABASE: Database name
- SCHEMA: Schema name (default
public)
Driver Adapter (Prisma ORM 7 required)
Prisma ORM 7 uses the query compiler by default, so you must use a driver adapter.
1. Install adapter and driver:
npm install @prisma/adapter-pg pg2. Instantiate Prisma Client with the adapter:
import 'dotenv/config'
import { PrismaClient } from '../generated/client'
import { PrismaPg } from '@prisma/adapter-pg'
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter })Common Issues
"Can't reach database server"
- Check host and port
- Check firewall settings
- Ensure database is running
"Authentication failed"
- Check user/password
- Special characters in password must be URL-encoded
"Schema does not exist"
- Ensure
?schema=public(or your schema) is in the URL
{
"name": "prisma-database-setup-postgresql",
"version": "7.0.0",
"author": "prisma",
"license": "MIT"
}Related skills
FAQ
What does prisma-database-setup-postgresql do?
prisma-database-setup-postgresql configures Prisma 7 PostgreSQL.
When should I use prisma-database-setup-postgresql?
Prisma PostgreSQL setup or connection errors.
Is this skill safe to install?
Review the Security Audits panel on this page before installing in production.