prisma-upgrade-v7

Migrate Prisma ORM projects from v6 to v7 across all breaking changes.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/samu412/Development_kisan_basket --skill prisma-upgrade-v7-samu412
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-upgrade-v7
Source: https://github.com/samu412/Development_kisan_basket/tree/main/category_kisan_basket/.agents/skills/prisma-upgrade-v7
Command: npx skills add https://github.com/samu412/Development_kisan_basket --skill prisma-upgrade-v7-samu412

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Upgrading from Prisma ORM v6 to v7 introduces breaking changes around the new prisma-client generator, mandatory driver adapters, prisma.config.ts, explicit environment loading, and new generated client entrypoints. This Skill provides a complete migration guide so you avoid import errors, connection failures, and deprecated API usage after upgrading. ## Core Features & Use Cases - Step-by-step migration path: Covers package updates, ESM/CommonJS module format selection, tsconfig changes, schema generator block updates, and prisma.config.ts creation. - Driver adapter setup: Provides installation and configuration for PostgreSQL, MySQL, SQLite, SQL Server, Neon, PlanetScale, Turso, D1, and Prisma Postgres adapters, including pool and SSL settings. - Removed feature replacements: Shows how to replace $use middleware with Client Extensions, Prisma.validator with TypeScript satisfies, and handle removed CLI flags and metrics. - Use Case: You upgrade a Node.js API to Prisma 7 and hit "Cannot find module" errors. Follow the schema-changes and driver-adapters references to fix the generator output path, install @prisma/adapter-pg, and update client instantiation. ## Quick Start Ask the AI to migrate your Prisma v6 project to v7, including updating the generator block, creating prisma.config.ts, and configuring a PostgreSQL driver adapter.

Frequently Asked Questions about prisma-upgrade-v7

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Prisma from v6 to v7?

Update @prisma/client and prisma to version 7, switch the generator provider to prisma-client with an explicit output path, create prisma.config.ts, install a driver adapter for your SQL database, update PrismaClient imports and instantiation, then run prisma generate.

What is a Prisma driver adapter and why is it required in v7?

A driver adapter connects Prisma Client to your database using native Node.js drivers instead of a query engine binary. Prisma v7 requires adapters for SQL providers, such as @prisma/adapter-pg for PostgreSQL or @prisma/adapter-better-sqlite3 for SQLite.

Does Prisma 7 support MongoDB?

No, Prisma 7 has no MongoDB connector and no MongoDB driver adapter package. MongoDB projects should stay on the latest Prisma 6.x release or migrate to Prisma Next instead of following the v7 SQL migration path.

How do I use Prisma 7 with CommonJS instead of ESM?

Keep your project as CommonJS and set moduleFormat = "cjs" in the generator block of your schema, then regenerate the client. Prisma v7 is ESM-first but the prisma-client generator supports CommonJS output explicitly.

Why does Prisma 7 not load my .env file automatically?

Prisma v7 removed automatic environment variable loading. Install dotenv and add import 'dotenv/config' as the first line of prisma.config.ts, or load variables explicitly in your application entry point. Bun loads .env files automatically.

What replaces Prisma.validator and $use middleware in v7?

Replace Prisma.validator with TypeScript's satisfies operator, for example satisfies Prisma.UserSelect. Replace $use middleware with Client Extensions using $extends, which support query interception for logging, soft deletes, and metrics-like counters.