Backend & APISûr9393/100
Prisma Upgrade V7 Schema Changes (Prisma)
Schema Changes. Reference when using this Prisma feature.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs prisma-upgrade-v7-schema-changes__prisma-cursor-plugin__skills-b9a952a8bb6bPrisma
prisma/cursor-plugin
Contenu à copier
---
name: prisma-upgrade-v7-schema-changes
description: Schema Changes. Reference when using this Prisma feature.
license: MIT
metadata:
origin: Prisma
author: prisma
version: "7.0.0"
---
# Schema Changes
Prisma v7 introduces a new `prisma-client` generator. Update your generator block and import paths accordingly.
## Generator Provider
### Before (v6)
```prisma
generator client {
provider = "prisma-client-js"
engineType = "binary" // or "library"
}
```
### After (v7)
```prisma
generator client {
provider = "prisma-client"
output = "../generated"
}
```
## Key Changes
### 1. Provider name
Use `prisma-client` in Prisma v7.
### 2. Output is required (for `prisma-client`)
The `output` field is **mandatory** when using `prisma-client`. Prisma Client no longer generates to `node_modules` with this generator.
```prisma
generator client {
provider = "prisma-client"
output = "../generated" // Required for prisma-client
}
```
### 3. Engine type removed
`engineType` is removed in Prisma v7. Remove any `engineType` setting from your generator block.
## Example Output Paths (prisma-client)
### Standard project
```prisma
output = "../generated"
```
Creates: `generated/client`
### Monorepo
```prisma
output = "../../packages/database/generated"
```
### Same directory as schema
```prisma
output = "./generated"
```
Creates: `prisma/generated/client`
## Datasource Block
The `url`, `directUrl`, and `shadowDatabaseUrl` values now live in `prisma.config.ts` in Prisma v7. Keep only the provider in `schema.prisma`:
### Before (v6)
```prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
```
### After (v7)
```prisma
datasource db {
provider = "postgresql"
// URLs configured in prisma.config.ts
}
```
```typescript
// prisma.config.ts
export default defineConfig({
datasource: {
url: env('DATABASE_URL'),
directUrl: env('DIRECT_URL'),
shadowDatabaseUrl: env('SHADOW_DATABASE_URL'),
},
})
```
## Full Example
### v6 Schema
```prisma
generator client {
provider = "prisma-client-js"
engineType = "library"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
```
### v7 Schema
```prisma
generator client {
provider = "prisma-client"
output = "../generated"
}
datasource db {
provider = "postgresql"
}
```
## After Schema Changes
1. Run `prisma generate`:
```bash
npx prisma generate
```
2. Update imports throughout your codebase:
```typescript
// Before (prisma-client-js)
import { PrismaClient } from '@prisma/client'
// After (prisma-client, output = "../generated")
import { PrismaClient } from '../generated/client'
```
3. Update .gitignore (if using `prisma-client` output):
```
generated
```
## Preview Features
Preview features work the same:
```prisma
generator client {
provider = "prisma-client"
output = "../generated"
previewFeatures = ["relationJoins", "fullTextSearch"]
}
```Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Prisma Upgrade V7 Schema Changes (Prisma)
Applique les pratiques du skill prisma-upgrade-v7-schema-changes__prisma-cursor-plugin__skills-b9a952a8bb6b.
Comment utiliser Prisma Upgrade V7 Schema Changes (Prisma)
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Prisma Upgrade V7 Schema Changes (Prisma)
Dis simplement à ton agent quelque chose comme :
Applique le skill prisma-upgrade-v7-schema-changes__prisma-cursor-plugin__skills-b9a952a8bb6b à cette tâche
Utilise prisma-upgrade-v7-schema-changes__prisma-cursor-plugin__skills-b9a952a8bb6b pour améliorer cette implémentation
Passe en revue ce sujet avec prisma-upgrade-v7-schema-changes__prisma-cursor-plugin__skills-b9a952a8bb6b
Skills liés à Prisma Upgrade V7 Schema Changes (Prisma)
Activate Site (Microsoft)
Activates and provisions a Power Pages website in a Power Platform environment via the Power Platform REST API. Use when the user wants to activate, provision, turn on, or enable a Power Pages website or portal.IA Core (TanStack)
Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, locks, custom-backend-integration, and debug-logging, plus the skills shipped by companion packages (@tanstack/ai-persistence, @tanstack/ai-code-mode). Use chat() not streamText(), openaiText() not createOpenAI(), toServerSentEventsResponse() not manual SSE, middleware hooks not onEnd callbacks.api-connector-builder
Build a new API connector or provider by matching the target repo's existing integration pattern exactly. Use when adding one more integration without inventing a second architecture.