prisma-database-setup

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

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/brillianodhiya/VisionScript --skill prisma-database-setup-brillianodhiya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/brillianodhiya/VisionScript/tree/main/.agents/skills/prisma-database-setup
Command: npx skills add https://github.com/brillianodhiya/VisionScript --skill prisma-database-setup-brillianodhiya

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 .env connection strings. - Driver Adapter Setup: Maps each database to the correct @prisma/adapter-* package and JS driver, with instantiation examples for Prisma Client. - Version Guidance: Clarifies that MongoDB projects should stay on Prisma 6.x with prisma-client-js, while SQL providers use the Prisma 7 adapter workflow. - Use Case: When switching a project from SQLite to PostgreSQL, follow the PostgreSQL reference to update the datasource provider, install @prisma/adapter-pg, set the DATABASE_URL, and regenerate Prisma Client. ## Quick Start Ask the AI to configure Prisma for your database, for example: "Set up Prisma with PostgreSQL in my project 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 = "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 }) after running npx prisma generate.

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. Pass the database-specific adapter, such as PrismaPg for PostgreSQL, to the PrismaClient constructor.

Does Prisma 7 support MongoDB?▼

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. Prisma 7's SQL driver adapter workflow does not provide a supported MongoDB upgrade path.

Which Prisma driver adapter should I use for MySQL?▼

Use @prisma/adapter-mariadb with the mariadb JS driver for MySQL and MariaDB. Create the adapter with host, port, user, password, and database options, or pass a connection string, then supply it to PrismaClient.

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 query 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. For edge runtimes or Turso, use @prisma/adapter-libsql instead of the better-sqlite3 adapter.