prisma-database-setup

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/Hugo-Ferrari/finances --skill prisma-database-setup-hugo-ferrari
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/Hugo-Ferrari/finances/tree/main/api/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/Hugo-Ferrari/finances --skill prisma-database-setup-hugo-ferrari

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 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 setup for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres, including schema blocks, prisma.config.ts, and .env connection strings. - Driver Adapter Selection: Maps each database to the correct @prisma/adapter-* package and JS driver, with instantiation examples for Prisma Client. - Version Guardrails: Keeps MongoDB projects on Prisma 6.x with prisma-client-js and prevents applying the Prisma 7 SQL adapter workflow to MongoDB. - Use Case: You are starting a new Node.js project on PostgreSQL. The skill gives you the datasource block, prisma.config.ts, DATABASE_URL format, the @prisma/adapter-pg setup, and the prisma generate workflow in one pass. ## Quick Start Ask the assistant to configure Prisma for your database, for example: set up Prisma with PostgreSQL including the driver adapter and client generation.

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 and run npx prisma generate.

Which Prisma driver adapter should I use for my database?▼

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.

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 report too many connections on MySQL?▼

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 SQLite with Prisma?▼

SQLite does not support enums or scalar list types like String[], and write operations lock the database file. Prisma polyfills enums as strings, but concurrent write-heavy workloads are a poor fit for SQLite.

How do I set up Prisma with PlanetScale?▼

PlanetScale uses the mysql provider but does not support foreign key constraints, so set relationMode = "prisma" in the datasource block to emulate relations in Prisma. Use the @prisma/adapter-mariadb adapter for the client connection.