prisma-upgrade-v7

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

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/rhorba/RestoLedger --skill prisma-upgrade-v7-rhorba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-upgrade-v7
Source: https://github.com/rhorba/RestoLedger/tree/main/api/.windsurf/skills/prisma-upgrade-v7
Command: npx skills add https://github.com/rhorba/RestoLedger --skill prisma-upgrade-v7-rhorba

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 removed-feature regressions. ## Core Features & Use Cases - Step-by-step migration path: Update packages, generator block, tsconfig, prisma.config.ts, driver adapters, and client instantiation in the correct order. - Detailed reference guides: Dedicated files for schema changes, driver adapters, ESM/CommonJS setup, environment variables, removed features, and Accelerate users. - Use Case: You upgrade to Prisma 7 and hit "Cannot find module" errors. The Skill walks you through setting the required generator output path, installing @prisma/adapter-pg, and updating PrismaClient imports to the generated entrypoint. ## Quick Start Ask the assistant to migrate your Prisma v6 project to Prisma 7, including the generator block, driver adapter, and prisma.config.ts setup.

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 such as @prisma/adapter-pg, update PrismaClient imports, then run prisma generate.

What driver adapter should I use with Prisma 7?

Prisma 7 requires a driver adapter matching your database: @prisma/adapter-pg for PostgreSQL and Prisma Postgres, @prisma/adapter-mariadb for MySQL, @prisma/adapter-better-sqlite3 for SQLite, plus adapters for Neon, PlanetScale, Turso, D1, and SQL Server.

Does Prisma 7 support MongoDB?

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

Can I use CommonJS with the Prisma 7 client?

Yes. Prisma 7 is ESM-first, but you can set moduleFormat = "cjs" in the generator block to emit a CommonJS client while keeping the rest of your app on CommonJS with matching tsconfig settings.

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

Prisma 7 removed automatic environment 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.

How do I replace Prisma middleware removed in v7?

The $use middleware API was removed in Prisma 7. Replace it with Client Extensions using $extends, which support query-level interception for logging, soft deletes, and metrics-like counters across all models.