prisma-database-setup

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

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/Sambhav242005/Major-Project --skill prisma-database-setup-sambhav242005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/Sambhav242005/Major-Project/tree/main/apps/web/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/Sambhav242005/Major-Project --skill prisma-database-setup-sambhav242005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up Prisma with the correct database provider, connection string format, driver adapter, and client generation workflow is error-prone, especially with the differences between Prisma 6 and Prisma 7 and between SQL and MongoDB setups. This Skill provides verified, provider-specific configuration guidance so you avoid misconfigured schemas, wrong adapters, and connection failures. ## 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: Keeps MongoDB projects on Prisma 6.x with prisma-client-js and prevents applying the Prisma 7 SQL adapter workflow where it does not belong. - 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, configure DATABASE_URL, and regenerate Prisma Client correctly. ## Quick Start Ask the AI 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 the datasource provider to postgresql in prisma/schema.prisma, define DATABASE_URL in .env with the postgresql:// connection string format, and reference it in prisma.config.ts. Then install @prisma/adapter-pg and pg, and pass a PrismaPg adapter instance to PrismaClient.

How to set up Prisma Client with driver adapters?

Install prisma and @prisma/client, add a generator block with provider prisma-client and an explicit output path, then run npx prisma generate. Instantiate PrismaClient with the adapter matching your database, such as PrismaPg for PostgreSQL or PrismaMariaDb for MySQL.

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 in schema.prisma. The Prisma 7 SQL driver adapter workflow does not apply to MongoDB, and no supported MongoDB upgrade path to Prisma 7 exists yet.

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 uses no SQL adapter.

Why does Prisma fail to connect to my database?

Common causes include wrong host or port, firewall rules, unencoded special characters in passwords, or a missing schema parameter in the connection string. For SQL Server, ensure TCP/IP is enabled; for MongoDB transactions, ensure the instance is a replica set.

What are the limitations of Prisma with SQLite?

SQLite does not support enums or scalar list types like String[] directly, and write operations lock the database file, limiting concurrency. The connection string uses the file:./dev.db format relative to where Prisma runs.