* fix: add configurable Prisma transaction timeout via environment variables
Prisma enforces a default 5-second transaction timeout which causes
failures when updating records with many foreign key relationships.
This change adds support for globally configurable transaction timeouts
through environment variables while maintaining backward compatibility.
Changes:
- Add PRISMA_TRANSACTION_TIMEOUT and PRISMA_TRANSACTION_MAX_WAIT env vars
- Modified PrismaService.$tx() to apply defaults from environment
- Updated .env.example files with documentation
- Maintains Prisma's built-in defaults (5000ms/2000ms) when not configured
- Allows per-call timeout overrides when explicitly provided
This resolves timeout errors in BatchService.batchUpdateDB() and other
long-running transactions without requiring code changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add diagnostic logging for Prisma transaction timeout configuration
Added console logging on PrismaService initialization to display the
configured transaction timeout values. This helps verify that the
PRISMA_TRANSACTION_TIMEOUT and PRISMA_TRANSACTION_MAX_WAIT environment
variables are being read correctly.
Log format:
[PrismaService] Transaction defaults: timeout=Xms, maxWait=Yms
(from env: PRISMA_TRANSACTION_TIMEOUT=X, PRISMA_TRANSACTION_MAX_WAIT=Y)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>