prisma-upgrade-v7

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

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

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, and this Skill guides the entire migration. ## Core Features & Use Cases - Step-by-step migration: Covers package updates, ESM or CommonJS module format selection, tsconfig changes, schema generator block updates, and client instantiation with driver adapters. - Detailed reference guides: Seven reference files cover schema changes, driver adapters, ESM support, prisma.config.ts, environment variables, removed features, and Accelerate users. - Use Case: A team upgrading a PostgreSQL-backed Node.js API to Prisma 7 follows the guide to install @prisma/adapter-pg, create prisma.config.ts, replace Prisma.validator with satisfies, and fix import errors after regenerating the client. ## Quick Start Ask the assistant to upgrade this project from Prisma 6 to Prisma 7 and fix any resulting errors.

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 from Prisma 6 to Prisma 7?▼

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 such as @prisma/adapter-pg, update client 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 SQL databases through native Node.js drivers instead of a bundled engine binary. Prisma 7 requires adapters like @prisma/adapter-pg for PostgreSQL or @prisma/adapter-mariadb for MySQL, giving smaller bundles and better serverless compatibility.

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 standard v7 SQL migration path.

Can I use Prisma 7 with CommonJS instead of ESM?▼

Yes, Prisma 7 is ESM-first but supports CommonJS by setting moduleFormat = "cjs" in the generator block. Keep your app as CommonJS, regenerate the client, and ensure tsconfig module settings match the chosen format.

Why do I get environment variable errors after upgrading to Prisma 7?▼

Prisma 7 no longer loads .env files automatically, so DATABASE_URL is undefined unless you load it explicitly. Install dotenv and add import 'dotenv/config' as the first line of prisma.config.ts, or rely on Bun's automatic .env loading.

What replaces Prisma.validator and $use middleware in Prisma 7?▼

Prisma.validator is replaced by TypeScript's satisfies operator, for example satisfies Prisma.UserSelect. The $use middleware API is removed; use Client Extensions with $extends and query hooks for logging, soft deletes, and similar cross-cutting behavior.