Commit Graph

2 Commits

Author SHA1 Message Date
briant 15c1408d3d fix(db-schema): the enum generator emitted unformatted output, so db:check-generated failed on a clean checkout
`pnpm run db:check-generated` has been failing for anyone who ran it, with no
change of their own. `scripts/prisma-enum-generator.mjs` wrote each type alias on
one line and never formatted the result, while the committed `enums.ts` is
prettier-wrapped at the repo's printWidth of 100. Generator output could
therefore never equal the committed file, and `postinstall` runs `db:generate` —
so every `pnpm install` left the file dirty and every run of the check gate went
red. CI does not run that gate, which is why this survived; the only person who
hits it is someone following "Before Committing" step 5.

The generator now formats with the resolved prettier config before writing. That
is scoped to the one file this generator owns rather than a prettier pass over
`packages/civitai-db-schema/src`, because the neighbouring generated files are
NOT prettier-clean — `models.ts` is emitted with double quotes against a
`singleQuote: true` config and passes the check exactly as it is. Formatting the
directory would reformat it wholesale for no reason.

With the generator fixed, the ~90 lines of churn collapse to one real staleness:
`CollectionItemRejectionReason` was committed as raw generator output in
`1ad8ae3443` while every other alias in the file was wrapped. That line is now
regenerated, and `db:check-generated` passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 10:30:34 -06:00
Manuel Emilio Urena 904ccb83b6 [CU-868avmq54] Removes imports from prisma client in frontend app (#1495)
* Removes imports from prisma client in frontend app

* Fixes after merge conflict

* Removes any traces of prisma from frontend

* Removes legacyBehavior prop in next/link

* Fixes after merge

---------

Co-authored-by: Briant Diehl <bkdiehl@gmail.com>
2024-11-20 11:50:10 -04:00