You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raise @docs.plus/hocuspocus from Prisma 6.19.3 to 7.10.0. Make the Prisma schema the only owner of document row types. Keep Zod as the write contract. Keep webapp and admin on wire types only.
Facts (2026-08-27)
Pins today: prisma, @prisma/client, and @prisma/adapter-pg at ^6.19.3. Lock resolves 6.19.3.
Latest generally available Prisma is 7.10.0 (npm dist-tag prev). 7.10.0 · Upgrade to v7
npm latest is Prisma 8 RC (8.0.0-rc.12 on this date). Do not take 8. Pin 7.10.0. Never write prisma@latest.
The adapter path is already live. src/lib/prisma.ts constructs PrismaPg and passes adapter into PrismaClient.
Generator is still prisma-client-js with previewFeatures = ["fullTextSearchPostgres"]. Prisma 7 wants prisma-client, a required output, and prisma.config.ts.
Six sites hardcode bunx prisma@6.19.3: Docker generate, entrypoint, compose migrate, start-production.ts, and fix-migration.ts. scripts/setup.sh still says 6.19.0. Move them together or boot drifts.
Settings search uses { search: } on title, keywords, and description. Confirm that filter after the bump.
$on('query'|'error'|'warn' as never, …) is a typing workaround. Re-type it on the v7 client.
Root deepmerge-ts@8.0.1 exists because Prisma 6's @prisma/config pulled 7.1.5. Drop the pin only after Prisma 7 stays green under bun audit.
Inside hocuspocus, production already imports DocumentMetadata from @prisma/client. A hand copy in src/types/document.types.ts omits deletedAt and must go.
Zod document.schema.ts is the write contract. keywords is string[] on the wire and String? in Prisma. The service already splits CSV. Keep that transform.
Webapp and admin never import @prisma/client. That split stays. fetchDocument.ts still types the slug payload with [key: string]: any. VersionTrigger is copied in webapp types/history.ts.
DocumentClientAuthor.clientId is BigInt in Prisma and number on the wire. Document that contract. Do not change it silently.
DocumentMetadata.email is the one stale cross-store copy. Dropping it is a later change. Not this ticket.
Storage design stays: one full Yjs snapshot per version. @@index([documentId]) stays. See apps/hocuspocus.server/CLAUDE.md.
Goal
Raise
@docs.plus/hocuspocusfrom Prisma6.19.3to 7.10.0. Make the Prisma schema the only owner of document row types. Keep Zod as the write contract. Keep webapp and admin on wire types only.Facts (2026-08-27)
prisma,@prisma/client, and@prisma/adapter-pgat^6.19.3. Lock resolves6.19.3.prev). 7.10.0 · Upgrade to v7latestis Prisma 8 RC (8.0.0-rc.12on this date). Do not take 8. Pin7.10.0. Never writeprisma@latest.src/lib/prisma.tsconstructsPrismaPgand passesadapterintoPrismaClient.prisma-client-jswithpreviewFeatures = ["fullTextSearchPostgres"]. Prisma 7 wantsprisma-client, a requiredoutput, andprisma.config.ts.bunx prisma@6.19.3: Docker generate, entrypoint, compose migrate,start-production.ts, andfix-migration.ts.scripts/setup.shstill says6.19.0. Move them together or boot drifts.{ search: }on title, keywords, and description. Confirm that filter after the bump.$on('query'|'error'|'warn' as never, …)is a typing workaround. Re-type it on the v7 client.deepmerge-ts@8.0.1exists because Prisma 6's@prisma/configpulled7.1.5. Drop the pin only after Prisma 7 stays green underbun audit.DocumentMetadatafrom@prisma/client. A hand copy insrc/types/document.types.tsomitsdeletedAtand must go.document.schema.tsis the write contract.keywordsisstring[]on the wire andString?in Prisma. The service already splits CSV. Keep that transform.@prisma/client. That split stays.fetchDocument.tsstill types the slug payload with[key: string]: any.VersionTriggeris copied in webapptypes/history.ts.DocumentClientAuthor.clientIdisBigIntin Prisma andnumberon the wire. Document that contract. Do not change it silently.DocumentMetadata.emailis the one stale cross-store copy. Dropping it is a later change. Not this ticket.@@index([documentId])stays. Seeapps/hocuspocus.server/CLAUDE.md.Bun.SQL. This ticket is the Prisma bump. Upgrade Bun to 1.4 and measure test plus backend wins #171 is not this work.Backlog row:
O8inBACKLOG-hocuspocus-backend.md.What to build
One change. Bump and type accountability land together.
prisma,@prisma/client, and@prisma/adapter-pgto7.10.0. Addprisma.config.ts. Switch the generator. Point every import at the new client output.bunx prisma@6.19.3(and the6.19.0setup hint) with the new pin in the same change.PrismaPgpool. Do not invent a second pool. Stripconnection_limitfrom any URL the CLI migrate path still sees, if 7 rejects it.P2002cede still behave. Re-type$on. Re-checkBytes/Uint8ArrayonFOR UPDATEraw reads.DocumentMetadata. Use generated Prisma types inside hocuspocus only.VersionTriggerso webapp imports the wire union, not a second literal.fetchDocument.ts's index signature. Type the slug-read DTO as the fields the route actually returns.deepmerge-tsafter the bump. Keep or drop the pin frombun audit, not from a blog.Out of scope
@prisma/prisma7install.@@index([documentId]).@prisma/clientinto webapp or admin.DocumentMetadata.email.Bun.SQL(that is a Upgrade Bun to 1.4 and measure test plus backend wins #171 ban).Acceptance criteria
prisma -vand@prisma/clientare7.10.0. Noprisma@6.19string remains in Docker, compose, entrypoint, or start scripts.prisma generateandprisma migrate deploywork locally and in the image. REST on:4000, WS, and worker start.Documentsrow. A slugP2002cede still returns.bun testis green. The store-pipeline or versions e2e that you can run locally is green.DocumentMetadata. Webapp and admin still have zero@prisma/clientimports.fetchDocumenthas no[key: string]: any.VersionTriggerhas one source.bun auditresult fordeepmerge-ts/@prisma/configis recorded. The pin is kept or dropped from that result.Blocked by
None. Can start immediately. Does not depend on #171 or #172. Do not fold this into the Bun soak.