Skip to content

Revert "update cockroachdb, postgresql-supabase, prisma-postgres exam…#8384

Merged
AmanVarshney01 merged 1 commit into
latestfrom
remove-accidental-merge
Nov 14, 2025
Merged

Revert "update cockroachdb, postgresql-supabase, prisma-postgres exam…#8384
AmanVarshney01 merged 1 commit into
latestfrom
remove-accidental-merge

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Nov 14, 2025

Copy link
Copy Markdown
Member

…ples (#8374)"

This reverts commit 042d233.

Accidentally Merged

Summary by CodeRabbit

  • Chores
    • Updated development tooling and runtime dependencies across database projects
    • Simplified Prisma client configuration and initialization patterns
    • Updated Node type definitions to the latest versions
    • Removed legacy configuration files and replaced them with streamlined setups

@coderabbitai

coderabbitai Bot commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This PR standardizes Prisma client setup across multiple database examples by replacing custom adapter-based configurations with the official @prisma/client package, simplifying generator configurations, removing custom generated client paths, and switching development tooling from tsx to ts-node.

Changes

Cohort / File(s) Summary
Package.json tooling updates
databases/cockroachdb/package.json, databases/postgresql-supabase/package.json, databases/prisma-postgres/package.json
Replace tsx with ts-node for script execution; update Prisma dependencies from 6.20.0-integration-next.3 to 6.9.0; add ts-node 10.9.2 and ts-node-dev 2.0.0; bump @types/node to 22.19.0 where applicable; remove @prisma/adapter-pg dependency.
Prisma schema generator simplification
databases/cockroachdb/prisma/schema.prisma, databases/postgresql-supabase/prisma/schema.prisma, databases/prisma-postgres/prisma/schema.prisma
Update generator provider from "prisma-client" to "prisma-client-js"; remove output and engineType options.
Prisma client initialization removal of adapters
databases/cockroachdb/src/script.ts, databases/cockroachdb/tests/prisma.test.ts, databases/postgresql-supabase/script.ts, databases/postgresql-supabase/prisma/seed.ts
Replace PrismaClient imports from local generated clients to @prisma/client; remove adapter-based instantiation (PrismaPg) and initialize with plain new PrismaClient().
Prisma extension adoption
databases/prisma-postgres/src/caching.ts, databases/prisma-postgres/src/queries.ts
Import PrismaClient from @prisma/client; add withAccelerate extension from @prisma/extension-accelerate; replace environment-based accelerateUrl configuration with .$extends(withAccelerate()) chaining.
Configuration file deletions
databases/postgresql-supabase/prisma.config.ts, databases/prisma-postgres/prisma.config.ts
Remove Prisma config files containing schema paths and migrations configuration.
Seed script configuration
databases/postgresql-supabase/package.json
Add top-level "prisma" object with seed script entry "seed": "ts-node prisma/seed.ts".

Sequence Diagram

sequenceDiagram
    participant App as Application
    participant OldClient as Old Setup<br/>(Adapter-based)
    participant NewClient as New Setup<br/>(Extension-based)
    
    rect rgb(200, 220, 255)
    Note over OldClient: Previous Flow
    App->>OldClient: import PrismaClient from generated
    App->>OldClient: new PrismaClient({ adapter: PrismaPg })
    OldClient->>OldClient: Initialize with adapter config
    end
    
    rect rgb(220, 255, 220)
    Note over NewClient: Updated Flow
    App->>NewClient: import PrismaClient from `@prisma/client`
    App->>NewClient: new PrismaClient()
    NewClient->>NewClient: Base client initialized
    App->>NewClient: .$extends(withAccelerate())
    NewClient->>NewClient: Extension applied
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Consistency across files: Changes follow a repetitive pattern (adapter removal, import redirection, generator simplification), which reduces per-file complexity.
  • Areas requiring attention:
    • Extension wiring in databases/prisma-postgres/src/{caching,queries}.ts: verify that .$extends(withAccelerate()) chaining is semantically equivalent to prior environment-based configuration.
    • Prisma configuration file deletions: confirm that removing prisma.config.ts does not break schema resolution or migration paths (especially in postgresql-supabase).
    • Dependency version alignment: ensure downgrade from 6.20.0-integration-next.3 to 6.9.0 does not introduce regressions with schema or API changes.

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change - reverting a specific commit due to accidental merge. It clearly communicates the intent to revert and provides context about what is being reverted.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 042d233 and fe7e8a6.

⛔ Files ignored due to path filters (3)
  • databases/cockroachdb/bun.lock is excluded by !**/*.lock
  • databases/postgresql-supabase/bun.lock is excluded by !**/*.lock
  • databases/prisma-postgres/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • databases/cockroachdb/package.json (1 hunks)
  • databases/cockroachdb/prisma/schema.prisma (2 hunks)
  • databases/cockroachdb/src/script.ts (1 hunks)
  • databases/cockroachdb/tests/prisma.test.ts (1 hunks)
  • databases/postgresql-supabase/package.json (1 hunks)
  • databases/postgresql-supabase/prisma.config.ts (0 hunks)
  • databases/postgresql-supabase/prisma/schema.prisma (1 hunks)
  • databases/postgresql-supabase/prisma/seed.ts (1 hunks)
  • databases/postgresql-supabase/script.ts (1 hunks)
  • databases/prisma-postgres/package.json (1 hunks)
  • databases/prisma-postgres/prisma.config.ts (0 hunks)
  • databases/prisma-postgres/prisma/schema.prisma (2 hunks)
  • databases/prisma-postgres/src/caching.ts (1 hunks)
  • databases/prisma-postgres/src/queries.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • databases/prisma-postgres/prisma.config.ts
  • databases/postgresql-supabase/prisma.config.ts
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-auth/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:59.096Z
Learning: The "prisma-client" generator provider (introduced in Prisma v6) is the newer, ESM-ready alternative to "prisma-client-js". It requires an explicit output path and is better suited for modern runtimes, edge deployments, and will become the default in Prisma v7. Use "prisma-client" for new projects or when modernizing existing projects.
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-subscriptions/prisma/schema.prisma:1-5
Timestamp: 2025-10-15T13:56:01.807Z
Learning: In Prisma v6.15 and later, `engineType = "client"` is a valid generator configuration value that generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead (e.g., prisma/adapter-pg). This is useful for edge and serverless deployments.
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/fastify-graphql/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:29.130Z
Learning: In Prisma v6.15 and later, `provider = "prisma-client"` is a valid generator configuration value when combined with `engineType = "client"`. This configuration generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead, and is different from the traditional `provider = "prisma-client-js"` configuration.
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/fastify-graphql-sdl-first/src/context.ts:1-1
Timestamp: 2025-10-27T13:18:46.546Z
Learning: In the prisma/prisma-examples repository, generated Prisma client files (typically at paths like `prisma/generated/client`) are intentionally not committed to the repository. These files are generated at build/test time. Do not flag missing generated client artifacts as issues in reviews.
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/fastify-graphql-sdl-first/src/context.ts:1-1
Timestamp: 2025-10-27T13:18:46.546Z
Learning: The prisma/prisma-examples repository is a monorepo containing many independent example projects. When reviewing PRs in this repository, focus only on the files actually changed by the author in that specific PR, not on other example projects or infrastructure that wasn't modified.
Learnt from: FGoessler
Repo: prisma/prisma-examples PR: 8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/betterauth-astro/src/pages/sign-up/index.astro:20-36
Timestamp: 2025-10-24T17:50:48.569Z
Learning: Do not suggest code changes or improvements to code in Prisma example repositories (prisma/prisma-examples). These examples are carefully set up and intentionally aligned with external documentation and information.
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
Repo: prisma/prisma-examples PR: 8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.

Applied to files:

  • databases/cockroachdb/tests/prisma.test.ts
  • databases/postgresql-supabase/prisma/seed.ts
  • databases/postgresql-supabase/prisma/schema.prisma
  • databases/prisma-postgres/prisma/schema.prisma
  • databases/cockroachdb/src/script.ts
  • databases/cockroachdb/package.json
  • databases/postgresql-supabase/script.ts
  • databases/prisma-postgres/package.json
  • databases/postgresql-supabase/package.json
  • databases/cockroachdb/prisma/schema.prisma
  • databases/prisma-postgres/src/queries.ts
📚 Learning: 2025-10-15T13:58:29.130Z
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/fastify-graphql/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:29.130Z
Learning: In Prisma v6.15 and later, `provider = "prisma-client"` is a valid generator configuration value when combined with `engineType = "client"`. This configuration generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead, and is different from the traditional `provider = "prisma-client-js"` configuration.

Applied to files:

  • databases/cockroachdb/tests/prisma.test.ts
  • databases/postgresql-supabase/prisma/seed.ts
  • databases/postgresql-supabase/prisma/schema.prisma
  • databases/prisma-postgres/src/caching.ts
  • databases/prisma-postgres/prisma/schema.prisma
  • databases/cockroachdb/src/script.ts
  • databases/postgresql-supabase/script.ts
  • databases/cockroachdb/prisma/schema.prisma
  • databases/prisma-postgres/src/queries.ts
📚 Learning: 2025-10-15T13:58:59.096Z
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-auth/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:59.096Z
Learning: The "prisma-client" generator provider (introduced in Prisma v6) is the newer, ESM-ready alternative to "prisma-client-js". It requires an explicit output path and is better suited for modern runtimes, edge deployments, and will become the default in Prisma v7. Use "prisma-client" for new projects or when modernizing existing projects.

Applied to files:

  • databases/cockroachdb/tests/prisma.test.ts
  • databases/postgresql-supabase/prisma/seed.ts
  • databases/postgresql-supabase/prisma/schema.prisma
  • databases/prisma-postgres/src/caching.ts
  • databases/prisma-postgres/prisma/schema.prisma
  • databases/cockroachdb/src/script.ts
  • databases/postgresql-supabase/script.ts
  • databases/prisma-postgres/package.json
  • databases/postgresql-supabase/package.json
  • databases/cockroachdb/prisma/schema.prisma
  • databases/prisma-postgres/src/queries.ts
📚 Learning: 2025-10-15T13:56:01.807Z
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-subscriptions/prisma/schema.prisma:1-5
Timestamp: 2025-10-15T13:56:01.807Z
Learning: In Prisma v6.15 and later, `engineType = "client"` is a valid generator configuration value that generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead (e.g., prisma/adapter-pg). This is useful for edge and serverless deployments.

Applied to files:

  • databases/cockroachdb/tests/prisma.test.ts
  • databases/postgresql-supabase/prisma/seed.ts
  • databases/postgresql-supabase/prisma/schema.prisma
  • databases/prisma-postgres/src/caching.ts
  • databases/prisma-postgres/prisma/schema.prisma
  • databases/cockroachdb/src/script.ts
  • databases/postgresql-supabase/script.ts
  • databases/cockroachdb/prisma/schema.prisma
  • databases/prisma-postgres/src/queries.ts
📚 Learning: 2025-10-27T13:18:46.546Z
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/fastify-graphql-sdl-first/src/context.ts:1-1
Timestamp: 2025-10-27T13:18:46.546Z
Learning: In the prisma/prisma-examples repository, generated Prisma client files (typically at paths like `prisma/generated/client`) are intentionally not committed to the repository. These files are generated at build/test time. Do not flag missing generated client artifacts as issues in reviews.

Applied to files:

  • databases/cockroachdb/tests/prisma.test.ts
  • databases/postgresql-supabase/prisma/seed.ts
  • databases/postgresql-supabase/prisma/schema.prisma
  • databases/prisma-postgres/prisma/schema.prisma
  • databases/cockroachdb/src/script.ts
  • databases/postgresql-supabase/script.ts
  • databases/prisma-postgres/package.json
  • databases/cockroachdb/prisma/schema.prisma
📚 Learning: 2025-08-22T12:12:43.161Z
Learnt from: FGoessler
Repo: prisma/prisma-examples PR: 8260
File: generator-prisma-client/nextjs-starter-turbopack/components/quotes.tsx:1-1
Timestamp: 2025-08-22T12:12:43.161Z
Learning: In Next.js applications using Prisma, the connection() function from 'next/server' serves a different purpose than 'export const dynamic = force-dynamic'. The connection() function ensures proper database connection context and request isolation, while dynamic = 'force-dynamic' only controls rendering strategy. Both should be used together and are not redundant.

Applied to files:

  • databases/cockroachdb/tests/prisma.test.ts
  • databases/postgresql-supabase/prisma/seed.ts
  • databases/prisma-postgres/src/caching.ts
  • databases/cockroachdb/src/script.ts
  • databases/postgresql-supabase/script.ts
  • databases/prisma-postgres/src/queries.ts
📚 Learning: 2025-10-27T13:18:46.546Z
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/fastify-graphql-sdl-first/src/context.ts:1-1
Timestamp: 2025-10-27T13:18:46.546Z
Learning: The prisma/prisma-examples repository is a monorepo containing many independent example projects. When reviewing PRs in this repository, focus only on the files actually changed by the author in that specific PR, not on other example projects or infrastructure that wasn't modified.

Applied to files:

  • databases/prisma-postgres/package.json
🧬 Code graph analysis (5)
databases/postgresql-supabase/prisma/seed.ts (1)
databases/cockroachdb/tests/prisma.test.ts (1)
  • prisma (3-3)
databases/prisma-postgres/src/caching.ts (1)
databases/cockroachdb/tests/prisma.test.ts (1)
  • prisma (3-3)
databases/cockroachdb/src/script.ts (1)
databases/cockroachdb/tests/prisma.test.ts (1)
  • prisma (3-3)
databases/postgresql-supabase/script.ts (1)
databases/cockroachdb/tests/prisma.test.ts (1)
  • prisma (3-3)
databases/prisma-postgres/src/queries.ts (1)
databases/cockroachdb/tests/prisma.test.ts (1)
  • prisma (3-3)
🪛 Biome (2.1.2)
databases/cockroachdb/tests/prisma.test.ts

[error] 2-3: Do not export from a test file.

(lint/suspicious/noExportsInTest)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
  • GitHub Check: test (orm/grpc)
  • GitHub Check: test (orm/astro)
  • GitHub Check: test (orm/nuxt)
  • GitHub Check: test (orm/express)
  • GitHub Check: test (orm/nest-graphql)
  • GitHub Check: test (orm/nextjs)
  • GitHub Check: test (orm/betterauth-nextjs)
  • GitHub Check: test (orm/fastify-graphql-sdl-first)
  • GitHub Check: test (orm/hapi)
  • GitHub Check: test (orm/graphql-auth)
  • GitHub Check: test (orm/graphql-nexus)
  • GitHub Check: test (orm/nextjs-trpc)
  • GitHub Check: test (orm/nextjs-graphql)
  • GitHub Check: test (orm/betterauth-astro)
  • GitHub Check: test (orm/nest-graphql-sdl-first)
  • GitHub Check: test (orm/hapi-graphql-sdl-first)
  • GitHub Check: test (orm/nest)
  • GitHub Check: test (orm/hapi-graphql)
  • GitHub Check: test (orm/fastify)
  • GitHub Check: test (orm/graphql-subscriptions)
  • GitHub Check: test (orm/react-router-7)
  • GitHub Check: test (orm/solid-start)
🔇 Additional comments (15)
databases/prisma-postgres/package.json (1)

5-17: Clean revert to stable Prisma 6.9.0 tooling.

The package reverts to stable Prisma 6.9.0 with ts-node-based execution. The presence of @prisma/extension-accelerate aligns correctly with the caching implementation in src/caching.ts.

databases/cockroachdb/package.json (1)

9-26: LGTM - Consistent revert to stable tooling.

The package correctly reverts to Prisma 6.9.0 with ts-node-based development tooling, consistent with the other reverted examples.

databases/prisma-postgres/prisma/schema.prisma (1)

1-24: Clean schema revert to standard generator.

The schema correctly reverts to the stable prisma-client-js provider configuration, removing the newer adapter-based setup. Model definitions remain semantically intact.

databases/prisma-postgres/src/queries.ts (1)

1-5: Correct Prisma client initialization with Accelerate extension.

The PrismaClient initialization correctly uses the extension pattern for Prisma Accelerate, which is the appropriate approach for the reverted 6.9.0 version.

databases/postgresql-supabase/prisma/schema.prisma (1)

4-11: LGTM - Standard schema configuration restored.

The schema correctly reverts to the stable prisma-client-js generator, consistent with the other examples in this revert.

databases/postgresql-supabase/script.ts (1)

1-3: Clean PrismaClient initialization.

The script correctly uses the standard PrismaClient from @prisma/client without adapter configuration, appropriate for the reverted state.

databases/prisma-postgres/src/caching.ts (1)

1-5: Proper Accelerate extension setup for caching.

The Accelerate extension is correctly integrated using the extension pattern, enabling caching strategies used later in the query at lines 18-21.

databases/postgresql-supabase/prisma/seed.ts (1)

1-49: Well-structured seed file with proper types.

The seed file correctly uses the standard PrismaClient and leverages TypeScript's satisfies operator with Prisma.UserCreateInput[] for type safety.

databases/cockroachdb/src/script.ts (1)

1-4: LGTM! Clean revert to standard Prisma Client setup.

The changes correctly revert to the standard @prisma/client import and default initialization, removing the adapter-based configuration. This is consistent with the PR's objective to revert an accidental merge.

databases/cockroachdb/prisma/schema.prisma (2)

1-3: Generator configuration reverted correctly.

The generator provider has been reverted to prisma-client-js from the adapter-based configuration, consistent with the PR's revert objective.


28-28: Minor formatting adjustment.

Trailing whitespace added to the tags field. This is a cosmetic change with no functional impact.

databases/cockroachdb/tests/prisma.test.ts (1)

1-3: Prisma Client setup reverted correctly.

The test file now uses the standard @prisma/client import and initialization, consistent with the revert.

Note: Static analysis (Biome) flags the export from a test file (line 3). If this export is needed for shared test utilities, this can be safely ignored. Otherwise, consider making the prisma instance local to this test file.

databases/postgresql-supabase/package.json (3)

6-6: Development tooling reverted to ts-node.

The dev script now uses ts-node instead of tsx, consistent with reverting to the previous tooling setup.


10-16: Dependencies reverted to stable versions.

The changes correctly revert to:

  • Stable Prisma version (6.9.0) from integration build
  • ts-node tooling instead of tsx
  • Standard dependency versions

This is consistent with the PR's revert objective.


17-22: Standard Prisma client and seed configuration restored.

The dependencies now use the standard @prisma/client (6.9.0) without adapters, and the seed configuration uses ts-node. This is consistent with reverting to the pre-adapter setup.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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