Julien MAUCLAIR accepted merge request !41: fix(deploy): generate Prisma client on target server for correct binaries at Klickbee / klickbee-crm

Julien MAUCLAIR
2026-01-21T14:57:22Z

Summary

Upgrade to Prisma 7.2.0 with driver adapter pattern

Add @prisma/adapter-pg for PostgreSQL connection

Configure Prisma output path to src/generated/prisma

Move database URL from schema.prisma to prisma.config.ts

Update all imports from @prisma/client to @/generated/prisma

Generate Prisma client on EC2 server for correct ARM64 binaries

Changes

prisma/schema.prisma: Add output path, remove datasource URL

prisma.config.ts: New config file with datasource URL

src/libs/prisma.ts: Use PrismaPg adapter pattern

src/libs/activityLogger.ts: Use shared prisma instance

.gitlab/ci/deploy.yml: Run prisma generate on EC2 server

14 API files: Update imports to @/generated/prisma

Test plan

Run npx prisma generate locally

Run npx tsc --noEmit to verify types

Deploy to production and verify no Prisma binary errors

Verify database operations work correctly

🤖 Generated with Claude Code