prisma-database-setup

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

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/vasuguptadot-jpg/Life-xp- --skill prisma-database-setup-vasuguptadot-jpg
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/vasuguptadot-jpg/Life-xp-/tree/main/attached_assets/LifeXP-Complete/apps/api/.agents/skills/prisma-database-setup
Command: npx skills add https://github.com/vasuguptadot-jpg/Life-xp- --skill prisma-database-setup-vasuguptadot-jpg

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 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 driver pairings (e.g., @prisma/adapter-pg with pg, @prisma/adapter-mariadb with mariadb) with instantiation examples for Prisma Client. - Version Guardrails: Clear rules for MongoDB projects to stay on Prisma 6.x with prisma-client-js instead of the Prisma 7 SQL adapter workflow. - Use Case: You are initializing a new Node.js API with PostgreSQL. Use this Skill to generate the correct datasource block, configure prisma.config.ts, install @prisma/adapter-pg, and instantiate Prisma Client with the adapter. ## Quick Start Ask the assistant to configure Prisma with your chosen 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 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 using your connection string.

How do I set up Prisma Client with a driver adapter?▼

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.

Can I use Prisma 7 with MongoDB?▼

No, 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 provide a supported MongoDB upgrade path.

Which 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 @prisma/adapter-mssql for SQL Server. MongoDB uses no SQL adapter.

Why does Prisma fail to connect to my database?▼

Common causes include incorrect host or port, firewall rules, unencoded special characters in passwords, or a missing schema parameter in the connection string. Verify the DATABASE_URL 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 lists like String[] directly, and write operations lock the database file, limiting concurrency. For edge deployments or Turso, use the @prisma/adapter-libsql adapter instead of better-sqlite3.