Can Prisma preserve mixed‑case PostgreSQL column names in production?
0 reputation · 08 Dec 2025, 00:24 UTC
Goal
The objective is to keep a Prisma schema that matches a PostgreSQL database containing mixed‑case column identifiers (e.g., "UserID") usable in both local development and a production environment. Locally the schema is generated by introspection, but Prisma converts all column names to lower case by default, which can cause runtime failures when the production database retains the original case.
Constraints
Prisma’s PostgreSQL introspection currently does not expose a toggle to preserve case. The only documented workarounds involve renaming columns to lower case or manually mapping them with @@map("UserID"), neither of which is ideal for a workflow that relies on automated pulls.
Unresolved Questions
- Can Prisma be configured to preserve the original column case for PostgreSQL?
- Does a preview flag or upcoming feature exist that addresses this behavior?
- What is the recommended strategy to reconcile case-sensitive columns without manual schema edits?