Skip to content

Prisma Postgres guide: update the Prisma ORM section to Prisma ORM 8 - #14835

Open
ankur-arch wants to merge 2 commits into
withastro:mainfrom
ankur-arch:docs/prisma-postgres-orm-8
Open

ankur-arch wants to merge 2 commits into
withastro:mainfrom
ankur-arch:docs/prisma-postgres-orm-8

Conversation

@ankur-arch

Copy link
Copy Markdown

Description (required)

Follow-up to #14664, which pinned this guide to Prisma ORM 7 as an interim fix. This updates the "Connect with Prisma ORM" section to Prisma ORM 8, the version an unpinned npm install prisma resolves to today, as #14605 preferred.

What changes for readers:

  • Setup is one command, npx prisma@latest orm init --target postgres --authoring psl, which installs the packages and writes prisma.config.ts, src/prisma/contract.prisma and src/prisma/db.ts. The guide no longer hand-writes src/lib/prisma.ts.
  • npx create-db@latest --env .env replaces prisma init --db for creating the Prisma Postgres database (that flag does not exist in the ORM 8 CLI, which is what Prisma Postgres guide is outdated #14605 ran into).
  • prisma generate / prisma migrate dev become prisma contract emit / prisma db init (with prisma db update for later changes).
  • The query example uses the ORM 8 client API (db.orm.public.Post.where(...).orderBy(...).all()).
  • A note at the top says the guide targets ORM 8, that ORM 8 is still a release candidate, and links Prisma's ORM 7 guide for Astro for readers who stay on 7.

The "Connect with Other ORMs and Libraries" section is untouched. Links are to Prisma's canonical docs pages with no tracking parameters. Happy to keep a collapsed ORM 7 section instead of the note if you would rather not drop the pinned instructions yet.

Testing (Astro 7.4.5, @astrojs/node standalone, Node 24.11, Prisma CLI 8.0.0-rc.30, @prisma/orm-postgres 8.0.0-rc.22, a real Prisma Postgres database):

Starting from npm create astro@latest -- --template minimal plus astro add node, I ran every command in the guide in order, pasted the Post model and src/pages/posts.astro exactly as written, inserted a published and an unpublished post, and confirmed astro build succeeds and /posts renders only the published post from both astro preview and astro dev. I then deleted the project and repeated the whole sequence once more from scratch to catch missing steps.

References

Disclosure: I work at Prisma.

@github-actions github-actions Bot added the 3rd-party guide Community submitted CMS, deploy, backend etc. guide label Nov 4, 2026
@astrobot-houston

astrobot-houston commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the tracking.ignoredKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
guides/backend/prisma-postgres.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@astrobot-houston

Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. Once a maintainer approves our workflows, you’ll be able to see a preview of your changes on Cloudflare 🥳.

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Preview deployment

🔄 Deployment in progress...

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @ankur-arch! 🙌🏽 I'm glad we receive help from Prisma to update the guide!

I left a few suggestions:

  • for the aside and the Node.js version to make long-term maintenance easier
  • a few nits regarding the order or our writing styles

I don't think we need to say here that Prisma ORM 8 is still a release candidate. But, if you think this is important, maybe we should just wait for the final release if it's coming soon.

@ArmandPhilippot ArmandPhilippot added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Nov 6, 2026
@ankur-arch

Copy link
Copy Markdown
Author

Thanks for the careful review, @ArmandPhilippot! All six suggestions are applied in 7696abf.

On the release candidate question: agreed, the page does not need to mention it. npm install prisma already resolves to Prisma ORM 8, and the paragraph still links the Prisma ORM 7 guide for anyone staying on 7, so there is no reason to wait for the final release.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd-party guide Community submitted CMS, deploy, backend etc. guide improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants