prisma-database-setup

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

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Shofikul-Isl4m/trading-app --skill prisma-database-setup-shofikul-isl4m
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/Shofikul-Isl4m/trading-app/tree/main/packages/db/.agents/skills/prisma-database-setup
Command: npx skills add https://github.com/Shofikul-Isl4m/trading-app --skill prisma-database-setup-shofikul-isl4m

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up Prisma ORM with a database involves provider-specific schema syntax, connection string formats, driver adapters, and version constraints that differ across databases. This Skill provides the correct configuration steps for each provider so you avoid misconfigured datasources, wrong adapters, and unsupported upgrade paths. ## Core Features & Use Cases - Provider-specific setup guides: Step-by-step configuration 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 underlying JS driver, with instantiation examples for Prisma Client. - Version guardrails: Clarifies that MongoDB projects must stay on Prisma 6.x with prisma-client-js and must not follow the Prisma 7 SQL adapter workflow. - Use Case: You are switching a Next.js app from SQLite to PostgreSQL. Use this Skill to update the datasource provider, install @prisma/adapter-pg, set the DATABASE_URL format, and regenerate Prisma Client correctly. ## Quick Start Ask the assistant to configure Prisma with PostgreSQL in your project, including the schema datasource, connection string, driver adapter, and client generation steps.

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 the datasource block of prisma/schema.prisma, define the URL via prisma.config.ts, and set DATABASE_URL in .env using the postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=SCHEMA format. Then install @prisma/adapter-pg and pg, and pass a PrismaPg adapter instance to PrismaClient.

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 Turso; 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. Connection strings use the file:PATH format relative to the schema location.

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