Skip to content

Compare Prisma 6 and Prisma Next runtime behavior#1

Open
jkomyno wants to merge 31 commits into
prisma:mainfrom
jkomyno:port/prisma-next-hybrid
Open

Compare Prisma 6 and Prisma Next runtime behavior#1
jkomyno wants to merge 31 commits into
prisma:mainfrom
jkomyno:port/prisma-next-hybrid

Conversation

@jkomyno
Copy link
Copy Markdown

@jkomyno jkomyno commented May 13, 2026

Summary

This PR compares Prisma 6 and Prisma Next in Dub, but the order matters.

We first had to port Dub.co away from PlanetScale/Vitess/MySQL assumptions and onto PostgreSQL. That was not a cosmetic prerequisite; it was the only way to make the later Prisma Next comparison meaningful. If Dub still spoke MySQL through Vitess, every difference would mix three separate variables: database dialect, PlanetScale behavior, and Prisma runtime behavior. The result would look precise while answering the wrong question.

Once Dub could run against PostgreSQL through Prisma 6, this branch added the hybrid Prisma Next comparison harness. The latest update refreshes the locally packed Prisma Next tarballs from prisma/prisma-next origin/main at 7044a2295bc398cec86e5c9cada3e932fcac486d, aligns the harness with the current Prisma Next runtime, and records the runtime SQL comparison against the Prisma 6 baseline.

What Changed

  • Ported the Prisma schema, raw SQL, and comparison fixtures from PlanetScale/Vitess/MySQL assumptions to PostgreSQL where the harness needs consistent database semantics.
  • Added local Prisma Next package tarballs packed from prisma/prisma-next origin/main.
  • Added comparison scripts for emitting Prisma Next artifacts, comparing generated DDL, comparing runtime SQL, and running a Prisma Next smoke check.
  • Normalized the latest Prisma Next contract behavior: built-in JSON codecs are non-parameterized, and prisma_contract.marker uses space text as its primary key.
  • Merged current prisma/dub main and resolved the conflicts by keeping the new network partner status, partner tag, and submitted-lead changes while preserving PostgreSQL query semantics.

Latest Verification

After resolving conflicts, I ran:

  • pnpm --filter=@dub/prisma format
  • pnpm --filter=@dub/prisma generate
  • pnpm --filter=@dub/prisma next:emit
  • pnpm --filter=@dub/prisma next:smoke

The latest full comparison run recorded:

  • pnpm --filter=@dub/prisma next:ddl:compare
    • 296 expected DDL differences
    • 0 unexpected differences
  • pnpm --filter=@dub/prisma next:sql:compare
    • 27 modules, 72 operations
    • 0 operation failures
    • Prisma 6: 117 captured queries
    • Prisma Next: 107 captured queries
    • Result type shape equal: 69/72
    • Before fixture equal: 72/72
    • After fixture equal: 53/72
  • pnpm --filter=@dub/prisma next:smoke

Notes

The remaining runtime differences are intentionally visible in the comparison output. Hiding them would make this branch easier to merge, but less useful. The point of the harness is to isolate Prisma runtime behavior after the database port, so the comparison can show exactly where Prisma Next still differs from Prisma 6.

jkomyno added 30 commits May 4, 2026 18:35
Pack Prisma Next from origin/main at 7044a2295bc398cec86e5c9cada3e932fcac486d and refresh the workspace lockfile against the local tarballs.
Normalize JSON columns for non-parameterized pg/json codecs, keep generated contract typings in sync, pass migrationsDir to dbInit planning, and update the local marker table shape to use the current space primary key.
Update the runtime SQL comparison notes with the May 13 rerun against locally packed Prisma Next origin/main, including the new totals, remaining mismatches, and harness compatibility notes.
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