docs(guides): fix the Vike and Remix guides, which fail on Composer 0.41.2 #9031
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 640 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.387
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #9031"
general
weight: 0.35
wmadden-electric
The Vike and Remix guides install the latest Composer, now 0.41.2, and both fail on it: Composer 0.41 requires every database to set
targetRef, the ref a deploy migrates the database to, and neither guide sets it, so the type check fails. This pull request addstargetRefto both guides, with the committed ref it needs, and creates the first migration withmigration plananddb migratein place ofdb init. Both guides were run end to end on Composer 0.41.2, Prisma ORM 8.0.0-rc.28 andprisma8.0.0-rc.39, including a deploy to Prisma Compute and a schema change.At a glance
Each guide's
module.tsnow names the ref its database migrates to:A ref is a file in
migrations/app/refs/that names the migration a database should be at. Production migrates to a committedproductionref, which the reader moves forward withprisma migration ref set production <migration directory>after each schema change. Every other environment, includingprisma devand the preview that deploy on push creates for each Git branch, migrates to@contract, the contract the commit emits, so a preview needs no ref of its own. The Composer page on deploying compares this rule with giving every environment its own ref (section "A ref for each new environment"), and both guides link to it.What changes
Both guides:
module.tspassestargetRef. The guide commits aproductionref before the first deploy and moves it after a schema change. Vike's troubleshooting adds the error a deploy gives for a missing ref,MIGRATION.UNKNOWN_REF.prisma db migrate. Theproductionref has to point at a migration that exists before the first deploy, and planning it first means every database, local or deployed, gets its tables from the same committed migration. Before, both guides created the local tables withdb initand planned a baseline migration from that database later. The sample output shows the plan's notice aboutdb initand says why it can be ignored.orm initwrites. Prisma Postgres runs PostgreSQL 17, and the ORM's rule is to list the oldest version the contract runs on. In ORM 8.0.0-rc.28 the two lists are identical, so this changes no behaviour today.prisma dev.Vike:
prisma devruns the built server with Bun. In the test run, Bun 1.3.13 returned an error on every page and Bun 1.4.5 worked; 1.3.14 is the first release after the failing one and was not run itself. This is not caused by Composer 0.41.2; the run found it, and the guide had no Bun version before. A troubleshooting entry says how to upgrade.Remix:
prisma migration planwrites import their contract snapshot without a file extension, which the starter's"moduleResolution": "NodeNext"rejects. The ORM writes them that way on purpose. The app never imports them, so step 3 addsmigrationstoexcludeintsconfig.json. Without it, the guide's own type check fails once the first migration exists..alchemy/and.prisma-composer/, are added to.gitignore, as the Vike guide already did.How it was checked
prisma dev, a deploy, a schema change and a second deploy.Left out
(index)/full-stack-tutorial.mdx, follows the appnpm create prismascaffolds, which still installs Composer 0.40.0, so it is consistent today. Its rewrite waits for thecreate-prismarelease that makes the scaffold install Composer 0.41.2.Agent: herodotus-23
🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Documentation
Updated the Remix and Vike guides with PostgreSQL setup instructions for empty databases and workflows for planning, applying, and committing migrations.
Clarified PostgreSQL capability compatibility, Vike’s Bun version requirement, and how to configure migration references across environments.
Revised deployment and schema-change steps, troubleshooting guidance, and agent prompts; added instructions for excluding migrations from TypeScript checks and ignoring Composer state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->