prisma-database-setup

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

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/singhaditya73/Naviq --skill prisma-database-setup-singhaditya73
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/singhaditya73/Naviq/tree/main/packages/db/.agents/skills/prisma-database-setup
Command: npx skills add https://github.com/singhaditya73/Naviq --skill prisma-database-setup-singhaditya73

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 generation involves many provider-specific details that are easy to get wrong, especially with the differences between Prisma 6 and Prisma 7 workflows. ## Core Features & Use Cases - Provider-Specific 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 Setup: Maps each database to the correct @prisma/adapter-* package and JS driver, with instantiation examples for Prisma Client. - Version Guardrails: Clarifies that MongoDB projects should stay on Prisma 6.x with prisma-client-js and must not follow the Prisma 7 SQL adapter workflow. - Use Case: When initializing a new project, ask to configure PostgreSQL with Prisma and receive the schema datasource block, prisma.config.ts, DATABASE_URL format, adapter installation commands, and a working PrismaClient instantiation. ## Quick Start Ask the AI to configure Prisma with your chosen database, for example: "Set up Prisma with PostgreSQL in my project 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 the URL via prisma.config.ts using env('DATABASE_URL'), and install @prisma/adapter-pg with pg. Then instantiate PrismaClient with new PrismaPg({ connectionString: process.env.DATABASE_URL }).

How to 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 by passing the database-specific adapter, such as PrismaPg for PostgreSQL or PrismaMariaDb for MySQL.

Can I use MongoDB with Prisma 7?

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 Prisma driver adapter do I need for my database?

PostgreSQL, CockroachDB, and Prisma Postgres use @prisma/adapter-pg; MySQL and MariaDB use @prisma/adapter-mariadb; SQLite uses @prisma/adapter-better-sqlite3 or @prisma/adapter-libsql for Turso; SQL Server uses @prisma/adapter-mssql. 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 the password, or a missing schema parameter in the connection string. Verify the DATABASE_URL format matches your provider, such as postgresql://user:password@host:5432/db?schema=public.

What are the limitations of SQLite with Prisma?

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.