prisma-database-setup

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

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill prisma-database-setup-dimonikrv
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/DimonikRV/ghost-pilot-project/tree/main/.agents/skills/prisma-database-setup
Command: npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill prisma-database-setup-dimonikrv

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 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. - Driver Adapter Setup: Correct adapter and driver pairings for each database, including edge/serverless options like Turso and Prisma Postgres serverless. - Prisma Client Generation: Instructions for the prisma-client generator, output paths, and single-instance client patterns. - Use Case: When switching a Next.js app from SQLite to PostgreSQL, follow the PostgreSQL reference to update the schema provider, set the DATABASE_URL, install @prisma/adapter-pg, and regenerate the client. ## Quick Start Ask the AI to configure Prisma for your chosen 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 the datasource provider to postgresql in schema.prisma, define the DATABASE_URL in prisma.config.ts, then install @prisma/adapter-pg and pg. Instantiate PrismaClient with the PrismaPg adapter using your connection string.

How to set up Prisma with MongoDB?▼

Stay on the latest Prisma 6.x release and use the prisma-client-js generator with the connection URL in schema.prisma. MongoDB does not support the Prisma 7 SQL driver adapter workflow, and models require an @id field mapped to _id with @db.ObjectId.

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

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

Does Prisma 7 work with MongoDB?▼

Prisma 7 does not provide a supported MongoDB upgrade path. MongoDB projects should stay on the latest Prisma 6.x release with prisma-client-js and use prisma db push instead of migrations.

Why does Prisma Client generation require an output path?▼

The prisma-client generator requires an explicit output path and does not generate into node_modules by default. Add output = "../generated" to the generator block and import PrismaClient from that path.

Why do MongoDB transactions fail in Prisma?▼

MongoDB transactions require a replica set; standalone instances do not support them. Ensure your MongoDB deployment is configured as a replica set, which Atlas clusters are by default.