prisma-database-setup

Configure Prisma ORM schema, adapters and client generation per database provider.

41|6|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/mralexsaavedra/spotiarr --skill prisma-database-setup-mralexsaavedra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/mralexsaavedra/spotiarr/tree/main/skills/prisma-database-setup
Command: npx skills add https://github.com/mralexsaavedra/spotiarr --skill prisma-database-setup-mralexsaavedra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prisma users need reliable, provider-specific guidance to set up database connections, Prisma schema configuration, and Prisma Client generation without getting stuck on version quirks or incorrect provider/adapter combinations.

Core Features & Use Cases

  • Provider-specific schema guidance: Configure prisma/schema.prisma for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres with the correct provider settings.
  • Adapter + driver setup for SQL workflows: Select and apply the appropriate Prisma driver adapter (for example, @prisma/adapter-pg + pg) to instantiate PrismaClient correctly.
  • MongoDB-safe configuration: Keeps MongoDB on the supported Prisma 6 MongoDB workflow by avoiding the Prisma 7 SQL adapter path and using prisma-client-js plus the correct _id mapping.
  • Client generation workflow: Ensures Prisma Client is installed, the generator block is configured with an output path, and prisma generate is rerun after schema changes.

Use it when you are starting a new project, switching database providers, troubleshooting connection and generation issues, or preparing environment-specific deployment setups.

Quick Start

Run the prisma-database-setup skill for your target provider and then apply its provider reference plus the Prisma client generation instructions to your prisma/schema.prisma and prisma.config.ts.

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 ORM for PostgreSQL and generate the client?

Configuring Prisma ORM for PostgreSQL involves mapping the provider in `schema.prisma` and applying the SQL driver adapter like `@prisma/adapter-pg` to instantiate PrismaClient correctly.

Does Prisma ORM work with MongoDB using the SQL driver adapter?

Prisma ORM does not use the SQL driver adapter for MongoDB. MongoDB configuration requires the Prisma 6 MongoDB-specific client path, utilizing `prisma-client-js` and correct `_id` mapping instead of the Prisma 7 adapter workflow.

What is the correct Prisma schema setup for switching database providers?

Correct Prisma schema setup for provider migrations requires selecting provider-specific settings in `schema.prisma`, configuring the generator block with an output path, and ensuring a provider-appropriate Prisma version workflow is applied.

Why does Prisma Client generation fail after changing the database connection?

Prisma Client generation fails after connection changes if the generator output path is misconfigured or the schema lacks the correct provider settings. Rerun `prisma generate` after applying the provider-specific schema updates.

Can I use Prisma ORM with SQL Server and CockroachDB?

You can use Prisma ORM with SQL Server and CockroachDB by configuring the specific provider settings in `schema.prisma`. These SQL providers utilize the appropriate Prisma driver adapters for correct PrismaClient instantiation.