prisma-database-setup

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

2|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/MahdiaMayati/spotlight --skill prisma-database-setup-mahdiamayati
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-database-setup
Source: https://github.com/MahdiaMayati/spotlight/tree/main/spotlight-backend/.windsurf/skills/prisma-database-setup
Command: npx skills add https://github.com/MahdiaMayati/spotlight --skill prisma-database-setup-mahdiamayati

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 for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres, including schema configuration, environment variables, and connection string formats. - Driver Adapter Setup: Instructions for installing and instantiating the correct driver adapter (such as @prisma/adapter-pg or @prisma/adapter-mariadb) for each SQL database. - Version Guidance: Clear rules on when to use Prisma 7's prisma.config.ts workflow versus staying on Prisma 6.x for MongoDB projects. - Use Case: When initializing a new Node.js project with PostgreSQL, follow the guide to write the schema datasource block, create prisma.config.ts, set DATABASE_URL, install @prisma/adapter-pg, and generate a working Prisma Client. ## Quick Start Ask the AI to configure Prisma with PostgreSQL in your project, including the schema, connection string, 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 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 in schema.prisma, keeping the URL as env("DATABASE_URL"). Do not apply the Prisma 7 SQL adapter workflow, and use prisma db push instead of migrations.

Which driver adapter should I use for my database in Prisma?▼

Use @prisma/adapter-pg for PostgreSQL, CockroachDB, and Prisma Postgres; @prisma/adapter-mariadb for MySQL; @prisma/adapter-better-sqlite3 for SQLite; and @prisma/adapter-mssql for SQL Server. MongoDB does not use a SQL driver adapter.

Does Prisma 7 support MongoDB?▼

Prisma 7 does not provide a supported MongoDB upgrade path. MongoDB projects should stay on the latest Prisma 6.x release with prisma-client-js and the classic connection URL in schema.prisma.

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's expected connection string structure.

What are the limitations of using SQLite with Prisma?▼

SQLite does not support enums or scalar list types like String[], and write operations lock the database file, limiting concurrency. For edge or serverless use, consider the LibSQL/Turso adapter instead of better-sqlite3.