Repository navigation
feat(prisma-postgres-upgrade): add the Prisma ORM 6 or 7 to Prisma 8 upgrade skill, and deploying an existing app to prisma-compute - #38
Merged
Conversation
…on Compute upgrade skill
… the prisma-8 skill The prisma-8 skill shipped in @prisma/orm-postgres already covers the contract, migrations and queries for the installed version. This skill now covers only what is specific to leaving Prisma ORM 6 or 7 and landing on Compute, and tells the agent to sync and follow prisma-8 for everything Prisma 8 specific. - Merge schema-contract-mapping and migrations-mapping into adopt-schema-and-migrations, keeping only the 6/7-specific parts - Trim client-api-mapping to the old-to-new call table and the four differences that break rewrites - Note that the setup pull request fixes work around current Console gaps, so the agent reads the PR before changing it - Renumber the path and the verify checklist
- Write the first Prisma 8 config in this skill and sync right after it; one sync installs all three skills
- Explain that prisma-8's 'does not apply' check is expected mid-upgrade
- Use .first({ id }) for primary-key lookups, matching prisma-8
- Document the auto-named baseline, the CommonJS JSON import, the seed client and start-command change
- Add the files to write without a Console setup pull request, including module: module.mjs in the workflow
- Pass env vars as service inputs; flag a non-UTC database time zone as a behavior change
kristof-siket
marked this pull request as ready for review
November 9, 2026 07:48
Contributor
Author
|
@coderabbitai review |
Contributor
Author
|
@prisma-gizmo review |
- prisma-postgres-upgrade covers only the upgrade and keeps the app runnable on any host - Move the setup-PR fixes into prisma-compute as references/deploy-existing-app.md - prisma-compute: pin Composer to the installed ORM, note prisma dev needs Node 24.11 - Fold in the second blind run: drop prisma generate in step 1, commit contract and migrations, client setup, delete-all, createAll and raw SELECT 1, manual page comparison is not a test - Point links at the restructured guides (/postgresql, /postgresql-incremental, /guides/compute/deploy-existing-app)
…pute deploy, not step 5 Step 5 of this skill removes @prisma/client. The composer section is added when the app deploys on Compute, which prisma-compute owns since the split. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ankur-arch
approved these changes
Nov 9, 2026
ankur-arch
left a comment
Contributor
There was a problem hiding this comment.
Read all nine files against the docs in prisma/web#8751. Approving.
Checked
- The three guide anchors the references link to (
#2-create-the-contract-from-your-schema,#5-rewrite-your-queries,#53-run-the-app-locally) exist in the new all-at-once guide, and so doescoming-from-prisma-orm-7#queries. - Versions match the docs pages:
prisma@8.0.0-rc.27,@prisma/orm-postgres@8.0.0-rc.20, Composer0.34.0. - The hand-offs line up in both directions:
prisma-postgres-upgradestops at a running Prisma 8 app,prisma-compute/deploy-existing-appstarts there, andprisma-orm-setuproutes to the right one.
One fix pushed (0d6fde5)
adopt-schema-and-migrations.md said "Step 5 adds a composer section to the same config". Since the split, step 5 of this skill removes @prisma/client, and the composer section comes from the Compute deploy. The sentence now points at prisma-compute.
Not verified here
I did not rerun the upgrade or the deploy end to end. The API details (service.load().db.client, dependencies: "external", the module.mjs shape) rest on the blind agent runs described in the PR body.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A new skill,
prisma-postgres-upgrade, that takes a PostgreSQL app on Prisma ORM 6 or 7 straight to Prisma 8 in one pass. The existingschema.prisma, database and data stay, and the app keeps running wherever it runs today. It also adds adeploy-existing-appreference toprisma-compute, for deploying an existing Prisma 8 app on Compute, including through the Console's setup pull request.Upgrading and deploying are separate on purpose. Most people come to upgrade to Prisma 8, or to deploy an app they already have, not to do both as one task. Compute runs only Prisma 8, so the link between the two is a rule: finish the upgrade before deploying. Each skill owns one job, and they hand off to each other.
They mirror the restructured docs in prisma/web#8751:
Tracked in PRS-850.
How it relates to the
prisma-8skillThe
prisma-8skill that ships inside@prisma/orm-postgresalready covers Prisma 8 itself: the contract, migrations, queries and errors, matched to the installed version. Its quickstart says it does not cover migrating from Prisma 6/7, and that those are separately installable skills. This is that skill.It's a bridge. It covers only what is specific to leaving Prisma ORM 6 or 7. It writes the first Prisma 8 config, runs
npx prisma skills sync, and hands every Prisma 8 detail toprisma-8. It lives in this registry, not in the package, because a Prisma 6 or 7 project needs it before any Prisma 8 package is installed.prisma-mongodb-upgradelives here for the same reason.What's in it
prisma-postgres-upgrade/SKILL.md:prisma-8andprisma-compute@latestfor an app headed to Computeprisma-postgres-upgrade/references/:adopt-schema-and-migrations.md: the firstprisma.config.ts, keeping the Prisma 6 or 7schema.prismaas the contract (prisma7Schema(...)reads both), a CommonJStsconfig, the baseline migration, and retiringprisma/migrations,generateand seed scriptsclient-api-mapping.md: the Prisma 8 client, old calls mapped to new ones, and five differences that break rewrites. One of them is a database time zone other than UTC, which changes the time stored for new rows.verify-upgrade-checklist.md: the result is proven with the repository's own checks, run the same way before and after. Comparing a few pages by hand is allowed but reported as manual, never as tests. A repo without tests is left for the user to review.prisma-compute/references/deploy-existing-app.md: what the Console's setup PR adds and gets wrong (the service in the build,entry,dependencies: "external", the client fromservice.load().db.clientbecauseDATABASE_URLis a placeholder on Compute, runtime files, env vars as service inputs), and the same files written by hand without a setup PR.prisma-compute/SKILL.md:deploy-existing-appruleprisma devneeds Node 24.11prisma-orm-setup/SKILL.mdandREADME.md: routing to the new skill, and the listing.How it was checked
tsc), up to the app serving its routes from the Prisma 8 client.dev: readyunderprisma dev. Pages and API output were identical to the Prisma 6 run against the same database, andprisma db verifypassed. The gaps each run found are fixed in the commits after it. The second run's remaining conflicts were between this skill andprisma-compute, which is why the deploy guidance now lives in one place.Merge order
Console's blocked-setup message already links
/docs/guides/upgrade-prisma-orm/postgresql, which becomes the one-pass guide, so no Console change is needed.