prisma-database-setup

Configure Prisma ORM with PostgreSQL, MySQL, SQLite, MongoDB, and other database providers.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/son1cleo/databrief --skill prisma-database-setup-son1cleo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/son1cleo/databrief/tree/main/frontend/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/son1cleo/databrief --skill prisma-database-setup-son1cleo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up Prisma with the correct database provider, connection string, driver adapter, and client generator involves many provider-specific details that are easy to get wrong, especially with the differences between Prisma 6 and Prisma 7 workflows. ## Core Features & Use Cases - Provider-Specific Guides: Step-by-step setup for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres, including schema blocks, prisma.config.ts, and connection string formats. - Driver Adapter Setup: Correct adapter and driver pairings for each database (e.g., @prisma/adapter-pg with pg, @prisma/adapter-mariadb with mariadb) with instantiation examples. - Version Guardrails: Clear guidance that MongoDB projects must stay on Prisma 6.x with prisma-client-js and must not adopt the Prisma 7 SQL adapter workflow. - Use Case: When scaffolding a new Next.js app on Neon Postgres, follow the PostgreSQL reference to write the datasource block, set DATABASE_URL, install @prisma/adapter-pg, and generate a working Prisma Client in minutes. ## Quick Start Ask the AI to configure Prisma for your database, for example: "Set up Prisma with PostgreSQL using a driver adapter and generate the client."

Frequently Asked Questions about prisma-database-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Prisma with PostgreSQL?

Set provider to "postgresql" in prisma/schema.prisma, define the datasource URL in prisma.config.ts, and set DATABASE_URL in .env. Then install @prisma/adapter-pg and pg, and instantiate PrismaClient with the PrismaPg adapter.

Which Prisma driver adapter should I use for my database?

Use @prisma/adapter-pg for PostgreSQL, CockroachDB, and Prisma Postgres; @prisma/adapter-mariadb for MySQL; @prisma/adapter-better-sqlite3 or @prisma/adapter-libsql for SQLite; and @prisma/adapter-mssql for SQL Server. MongoDB uses no SQL adapter.

Can I use Prisma 7 with MongoDB?

No. MongoDB projects should stay on the latest Prisma 6.x release with the prisma-client-js generator and the connection URL in schema.prisma. The Prisma 7 SQL adapter workflow does not provide a supported MongoDB upgrade path.

Why does Prisma Client generation require an output path?

The prisma-client generator requires an explicit output path and does not generate into node_modules by default. Add output = "../generated" to the generator block and import PrismaClient from that path, re-running prisma generate after every schema change.

How do I fix Prisma connection errors like authentication failed?

Verify the host, port, and credentials in your DATABASE_URL, and URL-encode special characters in passwords. For PostgreSQL, ensure the schema parameter is included; for SQL Server, confirm TCP/IP is enabled and SQL Server authentication is used.