prisma-database-setup

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

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/Rithika135/watchtower-360 --skill prisma-database-setup-rithika135
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/Rithika135/watchtower-360/tree/main/watchtower360-backend/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/Rithika135/watchtower-360 --skill prisma-database-setup-rithika135

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 version-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 setup references for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres. - Driver Adapter Configuration: Maps each database to the correct @prisma/adapter-* package and JS driver, with instantiation examples for PrismaClient. - Version-Aware Guidance: Distinguishes Prisma 7 SQL adapter workflows from the Prisma 6.x path required for MongoDB projects. - Use Case: When initializing a new Node.js project with PostgreSQL, follow the reference to set the datasource provider, configure prisma.config.ts with the DATABASE_URL, install @prisma/adapter-pg, and generate Prisma Client with an explicit output path. ## Quick Start Ask the AI to configure Prisma with PostgreSQL in your project, including the schema datasource, 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 = "postgresql" in prisma/schema.prisma, define the datasource URL in prisma.config.ts using env('DATABASE_URL'), and install @prisma/adapter-pg with the pg driver. 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 and use provider = "mongodb" with prisma-client-js as the generator. MongoDB models require an id field mapped with @map("_id") and @db.ObjectId, and you should use prisma db push instead of migrations.

Which Prisma 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 does not use a SQL adapter.

Can I use Prisma 7 with MongoDB?

No, MongoDB projects should stay on the latest Prisma 6.x release. Prisma 7's SQL adapter workflow does not provide a supported MongoDB upgrade path, so keep url = env("DATABASE_URL") in the schema and use prisma-client-js.

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 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.