prisma-upgrade-v7

Migrate Prisma ORM projects from v6 to v7 across generators, adapters, and config.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/son1cleo/databrief --skill prisma-upgrade-v7-son1cleo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-upgrade-v7
Source: https://github.com/son1cleo/databrief/tree/main/frontend/.windsurf/skills/prisma-upgrade-v7
Command: npx skills add https://github.com/son1cleo/databrief --skill prisma-upgrade-v7-son1cleo

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 provides a complete step-by-step migration path. ## Core Features & Use Cases - Schema and Generator Migration: Switch from prisma-client-js to the prisma-client generator with required output paths, moduleFormat options, and new client/browser/models/enums entrypoints. - Driver Adapter Setup: Configure required adapters for PostgreSQL, MySQL, SQLite, Neon, SQL Server, and Prisma Postgres, including pool and SSL settings. - Config and Environment Migration: Create prisma.config.ts, load .env files explicitly with dotenv, and replace removed features like $use middleware, metrics, and Prisma.validator. - Use Case: A Next.js app on Prisma v6 with Neon Postgres needs to upgrade to v7; follow the guide to install @prisma/adapter-pg, update the generator block, create prisma.config.ts, and fix all client imports. ## Quick Start Ask the assistant to upgrade your Prisma v6 project to Prisma 7 and walk through the generator, driver adapter, and prisma.config.ts changes.

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 like @prisma/adapter-pg, then run prisma generate and update your client imports.

What is the prisma-client generator in Prisma 7?

The prisma-client generator is the default in Prisma v7, replacing prisma-client-js for new projects. It requires an explicit output directory and generates client, browser, models, and enums entrypoints instead of writing to node_modules.

Does Prisma 7 work with 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 v7 removed the native query engine from the SQL client path, so connections go through driver adapters like @prisma/adapter-pg or @prisma/adapter-neon. This reduces bundle size and improves serverless and edge compatibility.

How do I fix Prisma.validator errors after upgrading?

The prisma-client generator no longer exposes Prisma.validator. Replace it with TypeScript's satisfies operator, for example defining a select object with satisfies Prisma.UserSelect imported from the generated client.

Why is DATABASE_URL undefined after upgrading to Prisma 7?

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