prisma-database-setup

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

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/ArvindIyer1/prediction-market-project --skill prisma-database-setup-arvindiyer1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/ArvindIyer1/prediction-market-project/tree/main/packages/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/ArvindIyer1/prediction-market-project --skill prisma-database-setup-arvindiyer1

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 Next.js app with PostgreSQL, follow the guide to set the datasource provider, configure DATABASE_URL, install @prisma/adapter-pg, and generate a working Prisma Client in minutes. ## Quick Start Ask the assistant to configure Prisma with your chosen database provider, for example by saying "set up Prisma with PostgreSQL in my project".

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 = "postgresql" in prisma/schema.prisma, define the datasource URL in prisma.config.ts using env('DATABASE_URL'), then install @prisma/adapter-pg and pg. Instantiate PrismaClient with new PrismaPg({ connectionString: process.env.DATABASE_URL }) and run npx prisma generate.

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 does not use a SQL driver 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 kept 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 using SQLite with Prisma?

SQLite does not support enums or scalar list types like String[], and write operations lock the database file, limiting concurrency. The connection string uses the file:PATH format, such as file:./dev.db.

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. Then follow the standard MySQL adapter setup with @prisma/adapter-mariadb.