prisma-database-setup

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

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-database-setup-alvarocg123
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/AlvaroCG123/BancoAtividade/tree/main/AtividadeBanco/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-database-setup-alvarocg123

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 provider-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 PrismaClient. - 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: When starting a new Node.js project with PostgreSQL, follow the guide to write the datasource block, set DATABASE_URL, install @prisma/adapter-pg, generate the client, and instantiate PrismaClient correctly. ## 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 = "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 new PrismaPg({ connectionString: process.env.DATABASE_URL }).

How do I set up Prisma with MongoDB?▼

Stay on the latest Prisma 6.x release, use provider = "mongodb" with url = env("DATABASE_URL") in the schema, and the prisma-client-js generator. Do not install SQL driver adapters, and use prisma db push instead of migrations.

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

PostgreSQL, CockroachDB, and Prisma Postgres use @prisma/adapter-pg; MySQL and MariaDB use @prisma/adapter-mariadb; SQLite uses @prisma/adapter-better-sqlite3 or @prisma/adapter-libsql for Turso; SQL Server uses @prisma/adapter-mssql.

Can I use Prisma 7 with MongoDB?▼

No. Prisma 7's SQL client path does not provide a supported MongoDB upgrade path. MongoDB projects should remain on the latest Prisma 6.x release with prisma-client-js until Prisma ships an official MongoDB upgrade path.

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, re-running prisma generate after every schema change.

Why do MongoDB transactions fail in Prisma?▼

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