prisma-upgrade-v7

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

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/Sahil-Showket/ShopSphere --skill prisma-upgrade-v7-sahil-showket
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-upgrade-v7
Source: https://github.com/Sahil-Showket/ShopSphere/tree/main/services/product-service/.windsurf/skills/prisma-upgrade-v7
Command: npx skills add https://github.com/Sahil-Showket/ShopSphere --skill prisma-upgrade-v7-sahil-showket

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, step-by-step migration path so you avoid import errors, connection failures, and deprecated API usage after upgrading. ## 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: Install and configure the required adapter for PostgreSQL, MySQL, SQLite, SQL Server, Neon, PlanetScale, Turso, D1, or Prisma Postgres, including pool and SSL settings. - Config and Environment Migration: Create prisma.config.ts, move datasource URLs out of schema.prisma, and load .env files explicitly with dotenv. - Removed Feature Replacements: Replace $use middleware with Client Extensions, Prisma.validator with TypeScript satisfies, and handle removed CLI flags and metrics. - Use Case: Your Node.js API fails with "Cannot find module" and driver adapter errors after running npm install prisma@7. Follow the ordered migration steps to update the generator block, install @prisma/adapter-pg, create prisma.config.ts, and regenerate a working client. ## Quick Start Ask the AI to migrate your Prisma v6 project to v7 by updating the schema generator, installing a driver adapter, and creating prisma.config.ts.

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 packages with npm install @prisma/client@7 and prisma@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 npx prisma generate.

What driver adapter do I need for Prisma 7?▼

Prisma 7 requires a driver adapter for SQL providers: @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. Pass the adapter to new PrismaClient({ adapter }).

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

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

Prisma v7 no longer loads environment variables automatically. 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.validator in v7?▼

The prisma-client generator no longer exposes Prisma.validator. Use TypeScript's satisfies operator instead, for example: const userSelect = { id: true, email: true } satisfies Prisma.UserSelect, importing Prisma from your generated client path.

Can I use Prisma Accelerate with driver adapters in v7?▼

No. Driver adapters expect direct database connection strings and fail with prisma:// or prisma+postgres:// URLs. For Accelerate, pass accelerateUrl to PrismaClient and apply the withAccelerate() extension from @prisma/extension-accelerate instead.