Skip to content

fix(worker): use PrismaPg adapter for Prisma 7 PostgreSQL connection#9

Merged
Kilbas merged 1 commit into
mainfrom
claude/review-docs-specs-bUpL0
May 6, 2026
Merged

fix(worker): use PrismaPg adapter for Prisma 7 PostgreSQL connection#9
Kilbas merged 1 commit into
mainfrom
claude/review-docs-specs-bUpL0

Conversation

@Kilbas
Copy link
Copy Markdown
Owner

@Kilbas Kilbas commented May 6, 2026

Prisma 7 requires a driver adapter for database connections. The worker's db.ts was calling new PrismaClient() with no adapter, which crashes because Prisma 7 has no built-in query engine without an adapter configured.

Fixed by mirroring the web app pattern: Pool → PrismaPg adapter → PrismaClient({ adapter }). Also added @prisma/adapter-pg and pg to worker dependencies (+ @types/pg to devDeps) so the worker package explicitly declares what it needs regardless of root-level hoisting.

https://claude.ai/code/session_01Axdu8uRj62ccyQJtpRxhUu

Prisma 7 requires a driver adapter for database connections. The worker's
db.ts was calling new PrismaClient() with no adapter, which crashes because
Prisma 7 has no built-in query engine without an adapter configured.

Fixed by mirroring the web app pattern: Pool → PrismaPg adapter →
PrismaClient({ adapter }). Also added @prisma/adapter-pg and pg to worker
dependencies (+ @types/pg to devDeps) so the worker package explicitly
declares what it needs regardless of root-level hoisting.

https://claude.ai/code/session_01Axdu8uRj62ccyQJtpRxhUu
@Kilbas Kilbas merged commit 073f694 into main May 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants