prisma-database-setup

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

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill prisma-database-setup-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/prisma-database-setup
Command: npx skills add https://github.com/zester4/zilmate --skill prisma-database-setup-zester4

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 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 to avoid misconfiguration and connection failures. ## Core Features & Use Cases - Provider-Specific Guides: Step-by-step setup for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres, including schema blocks, prisma.config.ts, and .env connection strings. - Driver Adapter Setup: Correct adapter and driver pairings (e.g., @prisma/adapter-pg with pg, @prisma/adapter-mariadb with mariadb) with instantiation examples for Prisma Client. - Version-Aware Guidance: Clear rules for keeping MongoDB projects 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 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 the datasource provider to postgresql in prisma/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 and run npx prisma generate.

How do I set up Prisma with MongoDB?

Stay on the latest Prisma 6.x release and use provider mongodb with prisma-client-js, keeping the url in schema.prisma. Do not install SQL driver adapters, and use prisma db push instead of migrations since MongoDB is schema-less.

Which Prisma driver adapter should I use for MySQL?

Use @prisma/adapter-mariadb with the mariadb driver for MySQL and MariaDB. Install both packages, then pass a PrismaMariaDb adapter instance configured with host, port, user, password, and database to PrismaClient.

Does Prisma 7 support MongoDB?

Prisma 7 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 migration 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. Set output in the generator block, such as ../generated, and import PrismaClient from that path.

Why do MongoDB transactions fail with 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.