prisma-database-setup

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

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/dlptho356/TTTN --skill prisma-database-setup-dlptho356
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/dlptho356/TTTN/tree/main/DATN/backend/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/dlptho356/TTTN --skill prisma-database-setup-dlptho356

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up Prisma ORM with the correct database provider, connection string, driver adapter, and client generation involves many version-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 configuration for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres, including schema blocks, prisma.config.ts, and environment variables. - Driver Adapter Setup: Maps each database to the correct @prisma/adapter-* package and JS driver, with instantiation examples for Prisma Client. - Version Guardrails: Clarifies that MongoDB projects should stay on Prisma 6.x with prisma-client-js and must not follow the Prisma 7 SQL adapter workflow. - Use Case: When initializing a new Node.js project with PostgreSQL, follow the guide 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 with your chosen database provider, for example by saying "set up Prisma with PostgreSQL using a driver adapter".

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 using env('DATABASE_URL'), and install @prisma/adapter-pg with pg. Then instantiate PrismaClient with the PrismaPg adapter using your connection string.

How to set up Prisma Client with a driver adapter?

Install prisma and @prisma/client, add a generator block with provider "prisma-client" and an explicit output path, then run npx prisma generate. Instantiate PrismaClient with the adapter matching your database, such as PrismaPg for PostgreSQL or PrismaMariaDb for MySQL.

Does Prisma 7 support MongoDB?

Prisma 7 does not provide a supported MongoDB upgrade path. MongoDB projects should stay on the latest Prisma 6.x release using prisma-client-js, keep the URL in schema.prisma, and avoid installing SQL @prisma/adapter-* packages.

Which driver adapter should I use for each database in Prisma?

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

Why does Prisma fail to connect to MySQL with too many connections?

MySQL enforces a connection limit, and each PrismaClient instance creates its own connection pool. Reuse a single PrismaClient instance per process and adjust the pool size with the connection_limit parameter in the DATABASE_URL.

What are the limitations of using SQLite with Prisma?

SQLite does not support enums or scalar list types like String[] directly, and write operations lock the database file, limiting concurrency. It suits local development and embedded use cases rather than high-write production workloads.