prisma-upgrade-v7

Migrates Prisma ORM projects from v6 to v7 across schema, adapters, and configuration.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/dlptho356/TTTN --skill prisma-upgrade-v7-dlptho356
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-upgrade-v7
Source: https://github.com/dlptho356/TTTN/tree/main/DATN/backend/.windsurf/skills/prisma-upgrade-v7
Command: npx skills add https://github.com/dlptho356/TTTN --skill prisma-upgrade-v7-dlptho356

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, and explicit environment loading, and this Skill guides you through every required migration step. ## Core Features & Use Cases - Schema and Generator Migration: Switch from prisma-client-js to the prisma-client generator with required output paths and new generated entrypoints (client, browser, models, enums). - Driver Adapter Setup: Install and configure the required adapter for PostgreSQL, MySQL, SQLite, SQL Server, Neon, PlanetScale, and other SQL providers, including pool and SSL settings. - Configuration and Cleanup: Create prisma.config.ts, load environment variables with dotenv, replace Prisma.validator with satisfies, and migrate middleware to Client Extensions. - Use Case: You upgrade a Node.js API to Prisma 7 and hit "Cannot find module" errors; follow the reference files to fix the generator output path, add the PrismaPg adapter, and regenerate the client. ## Quick Start Ask the assistant to upgrade your project from Prisma 6 to Prisma 7 and fix any resulting import or connection 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 for your SQL database, update client imports and instantiation, then run prisma generate.

What is the prisma-client generator in Prisma 7?

prisma-client is the default generator in Prisma 7, replacing prisma-client-js for current projects. It requires an explicit output path instead of generating into node_modules and produces client, browser, models, and enums entrypoints.

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.

Why does Prisma 7 require a driver adapter?

Prisma 7 removed the native engine binary from the SQL client path, so connections go through driver adapters like @prisma/adapter-pg that use native Node.js database drivers. This reduces bundle size and improves serverless and edge compatibility.

How do I fix "Cannot find module" errors after upgrading Prisma?

Check that the generator output path in schema.prisma matches your import path, such as ../generated/prisma/client, and confirm prisma generate ran successfully. Also verify your tsconfig module and moduleResolution settings align with the generator moduleFormat.

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

Prisma.validator is replaced by TypeScript's satisfies operator, for example defining a select object with satisfies Prisma.UserSelect. The $use middleware is replaced by Client Extensions using $extends with query hooks for logging, soft deletes, and similar patterns.