prisma-upgrade-v7

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

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-upgrade-v7-alvarocg123
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-upgrade-v7
Source: https://github.com/AlvaroCG123/BancoAtividade/tree/main/AtividadeBanco/.windsurf/skills/prisma-upgrade-v7
Command: npx skills add https://github.com/AlvaroCG123/BancoAtividade --skill prisma-upgrade-v7-alvarocg123

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 guides the full migration so projects 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, module format options, and new client/browser/models/enums entrypoints. - Driver Adapter Setup: Install and configure required adapters for PostgreSQL, MySQL, SQLite, SQL Server, Neon, PlanetScale, Turso, D1, and Prisma Postgres, including pool and SSL settings. - Configuration and Environment Migration: Create prisma.config.ts, move datasource URLs out of the schema, and load environment variables 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: A team upgrading a PostgreSQL-backed Node.js API to Prisma 7 follows the step-by-step guide to update packages, configure the PrismaPg adapter, create prisma.config.ts, fix imports, and regenerate the client. ## Quick Start Ask the assistant to upgrade your project from Prisma 6 to Prisma 7 and apply the required schema, adapter, and configuration 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 for your SQL database, update client imports and instantiation, then run prisma generate.

What driver adapter should I use with Prisma 7?▼

Prisma 7 requires driver adapters 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.

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.

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

Yes. Prisma 7 is ESM-first, but you can keep a CommonJS project by setting moduleFormat = "cjs" in the generator block and regenerating the client. Ensure your tsconfig module and moduleResolution settings match.

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

Prisma v7 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.validator and $use middleware in v7?▼

Replace Prisma.validator with TypeScript's satisfies operator, for example satisfies Prisma.UserSelect. Replace $use middleware with Client Extensions using $extends and query hooks for logging, soft deletes, and similar patterns.