원클릭으로
prisma-upgrade-v7-schema-changes
Schema Changes. Reference when using this Prisma feature.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Schema Changes. Reference when using this Prisma feature.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
prisma db execute. Reference when using this Prisma feature.
prisma db pull. Reference when using this Prisma feature.
prisma db push. Reference when using this Prisma feature.
prisma db seed. Reference when using this Prisma feature.
prisma debug. Reference when using this Prisma feature.
prisma dev. Reference when using this Prisma feature.
| name | prisma-upgrade-v7-schema-changes |
| description | Schema Changes. Reference when using this Prisma feature. |
| license | MIT |
| metadata | {"author":"prisma","version":"7.0.0"} |
Prisma v7 introduces a new prisma-client generator. Update your generator block and import paths accordingly.
generator client {
provider = "prisma-client-js"
engineType = "binary" // or "library"
}
generator client {
provider = "prisma-client"
output = "../generated"
}
Use prisma-client in Prisma v7.
prisma-client)The output field is mandatory when using prisma-client. Prisma Client no longer generates to node_modules with this generator.
generator client {
provider = "prisma-client"
output = "../generated" // Required for prisma-client
}
engineType is removed in Prisma v7. Remove any engineType setting from your generator block.
output = "../generated"
Creates: generated/client
output = "../../packages/database/generated"
output = "./generated"
Creates: prisma/generated/client
The url, directUrl, and shadowDatabaseUrl values now live in prisma.config.ts in Prisma v7. Keep only the provider in schema.prisma:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
datasource db {
provider = "postgresql"
// URLs configured in prisma.config.ts
}
// prisma.config.ts
export default defineConfig({
datasource: {
url: env('DATABASE_URL'),
directUrl: env('DIRECT_URL'),
shadowDatabaseUrl: env('SHADOW_DATABASE_URL'),
},
})
generator client {
provider = "prisma-client-js"
engineType = "library"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
generator client {
provider = "prisma-client"
output = "../generated"
}
datasource db {
provider = "postgresql"
}
Run prisma generate:
npx prisma generate
Update imports throughout your codebase:
// Before (prisma-client-js)
import { PrismaClient } from '@prisma/client'
// After (prisma-client, output = "../generated")
import { PrismaClient } from '../generated/client'
Update .gitignore (if using prisma-client output):
generated
Preview features work the same:
generator client {
provider = "prisma-client"
output = "../generated"
previewFeatures = ["relationJoins", "fullTextSearch"]
}