prisma-database-setup

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

7|2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/ysfcl/GeoMorphosis --skill prisma-database-setup-ysfcl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/ysfcl/GeoMorphosis/tree/main/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/ysfcl/GeoMorphosis --skill prisma-database-setup-ysfcl

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 generator is error-prone, especially with the differences between Prisma 6 and Prisma 7 workflows. This Skill provides verified, provider-specific configuration guidance so you avoid misconfigured schemas, wrong adapters, 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 JS driver pairings (e.g., @prisma/adapter-pg with pg, @prisma/adapter-better-sqlite3) with PrismaClient instantiation examples. - Version Guardrails: Clear rules for MongoDB projects to stay on Prisma 6.x with prisma-client-js instead of the unsupported Prisma 7 SQL adapter path. - Use Case: You are switching a Next.js app from SQLite to PostgreSQL. Use this Skill to update the datasource provider, configure prisma.config.ts, install @prisma/adapter-pg, and regenerate Prisma Client correctly. ## Quick Start Ask the AI to configure Prisma with PostgreSQL in your project, including the schema, environment variable, 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 provider to "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 the PrismaPg adapter and run npx prisma generate.

How to set up Prisma with MongoDB?▼

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

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 support MongoDB?▼

Prisma 7 does not provide a supported MongoDB upgrade path. MongoDB projects should remain on the latest Prisma 6.x line with prisma-client-js and the classic connection URL in schema.prisma until Prisma ships an official migration path.

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 URL. Verify the connection string format for your provider and confirm the database server is running.

What are the limitations of Prisma with SQLite?▼

SQLite does not support enums or scalar list types like String[], and write operations lock the database file, limiting concurrency. Prisma polyfills enums as strings, but high-concurrency workloads should use a client-server database instead.