Skip to content

Instantly share code, notes, and snippets.

View stevenaanen's full-sized avatar

Steven Aanen stevenaanen

View GitHub Profile
@stevenaanen
stevenaanen / convert-casing-after-prisma-pull.mjs
Last active November 7, 2023 14:52
Transform Prisma Schema to js-friendly names
// @ts-check
/*
* Run using `node convert-casing-after-prisma-pull.mjs` after installing `change-case` in your workspace.
* Then pipe your schema into it.
*
* Script will normalize the model names, field names and enums.
* It should not affect your database schema, only the generated js client from Prisma.
*
* Tip: after processing, run `prisma format` on the file.
*/