Skip to content

fix(prisma-postgres-upgrade): read versions from the Console, update the date notes for rc.23 - #39

Open
kristof-siket wants to merge 1 commit into
mainfrom
fix/postgres-upgrade-temporal-polyfill
Open

kristof-siket wants to merge 1 commit into
mainfrom
fix/postgres-upgrade-temporal-polyfill

Conversation

@kristof-siket

@kristof-siket kristof-siket commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

prisma-postgres-upgrade pinned prisma 8.0.0-rc.27 and @prisma/orm-postgres 8.0.0-rc.20 as the versions "today's" Console setup installs. The Console now installs prisma 8.0.0-rc.33 and @prisma/orm-postgres 8.0.0-rc.23 (PRISMA_CLI_VERSION / ORM_POSTGRES_VERSION in pdp-control-plane packages/interactors/src/compute/planComposerSetup.ts). The skill's date notes also described rc.20 behavior that rc.21 and rc.22 changed.

Prisma's code tasks service (pdp-control-plane) runs this skill to upgrade customer apps. In an eval on rc.20, the type check failed with Cannot find namespace 'Temporal' in @prisma/orm-target-postgres. That error is specific to rc.20. From rc.21, those types import Temporal from temporal-spec themselves. So the fix is to install the Console's versions, not to add a polyfill step. An earlier version of this PR added a temporal-polyfill step; it is removed.

What changes

  • Versions: use the exact versions the Console's message or setup pull request names. rc.33 / rc.23 is given only as an example. For an app not headed to Compute, npm view prisma@<version> dependencies names the @prisma/orm-toolchain version, and @prisma/orm-postgres takes the same one (rc.27 → rc.20, rc.33 → rc.23). The @latest warning now says latest can move past the Console's Composer version. Today latest is rc.33 / rc.23.
  • client-api-mapping.md, the old differences 3 and 4:
    • At rc.20, a Prisma 6/7 DateTime read as a string. From rc.22 it reads and writes a JavaScript Date in UTC, as in 6/7. The new difference is that @db.Date and @db.Time read as strings.
    • At rc.20, the database filled @default(now()) in its own time zone. From rc.21 the client writes it in UTC, as 6/7 did, so it is no longer a difference. It is now a short note, which leaves four differences.
    • The notes say they hold for rc.22 and later, and point to the synced prisma-8 skill for older versions.
  • The time zone decision is gone from "What the user does" and from the checklist. The README topic line is updated to match.
  • Verified against: keeps the rc.27 / rc.20 agent run and adds what was checked at rc.33 / rc.23.
  • metadata.version 2.0.1.

What I checked at rc.33 / rc.23

On Node.js 24.21 and PostgreSQL 18.6, I used a CommonJS app with a Prisma 6 schema.prisma and the table Prisma 6 migrate creates for it. The schema has DateTime @default(now()), DateTime @updatedAt, @db.Timestamptz(3) and @db.Date fields. I set the database's time zone to America/New_York.

  • prisma contract emit and prisma db sign work. The contract uses pg/timestamp-date@1 for DateTime, pg/timestamptz-date@1 for @db.Timestamptz and pg/date-string@1 for @db.Date.
  • tsc (TypeScript 5.9.3) passes on the skill's src/db.ts with no Temporal polyfill or types. The type check rejects assigning a DateTime field to a string. The .d.mts files in @prisma/orm-target-postgres import Temporal from temporal-spec.
  • At runtime, with no global Temporal: createdAt, updatedAt and publishedAt read back as Date. day reads as the string "2026-11-10".
  • A create without createdAt or updatedAt stored 16:04:53.601, the UTC time. The database's local time was 11:04. An update moved updatedAt forward.
  • prisma db verify, the full agent run, and the query-mapping table were not re-checked at rc.23. .first({ id }) and .where(...).update(...) were used and work.

🤖 Generated with Claude Code

…the date notes for rc.23

The skill pinned prisma 8.0.0-rc.27 and @prisma/orm-postgres 8.0.0-rc.20
as "today's" Console versions. The Console now installs rc.33 and rc.23,
and its date notes described rc.20 behavior that no longer holds.

- Versions: use the exact versions the Console's message or setup pull
  request names; rc.33 / rc.23 is only an example. For apps not headed
  to Compute, match the pair through prisma's @prisma/orm-toolchain.
- client-api-mapping: from rc.22, DateTime, @db.Timestamp and
  @db.Timestamptz read and write a Date again; @db.Date and @db.Time read
  as strings. From rc.21, @default(now()) and @updatedat are written by
  the client in UTC, so the database's time zone no longer matters.
- Drop the time zone decision from "What the user does" and the
  checklist; README topic line to match.
- Verified against: what was checked at rc.33 / rc.23.
- version 2.0.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kristof-siket
kristof-siket force-pushed the fix/postgres-upgrade-temporal-polyfill branch from 236125c to 1d4a1c0 Compare November 10, 2026 16:06
@kristof-siket kristof-siket changed the title fix(prisma-postgres-upgrade): load Temporal in the Prisma 8 client fix(prisma-postgres-upgrade): read versions from the Console, update the date notes for rc.23 Nov 10, 2026
@kristof-siket
kristof-siket marked this pull request as ready for review November 10, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant