Skip to content

Conversation

@AmanVarshney01
Copy link
Contributor

@AmanVarshney01 AmanVarshney01 commented Nov 2, 2025

Summary by CodeRabbit

  • Refactor

    • Migrated database connection architecture across projects to use adapter-based approach.
    • Updated database configuration to support standard PostgreSQL and SQLite adapters.
  • Documentation

    • Updated setup guides with revised configuration examples and new connection string formats.
  • Chores

    • Updated Prisma tooling and database connection dependencies.

@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Walkthrough

This PR replaces the Prisma Accelerate extension-based approach with driver adapters across multiple example projects. Changes include updating dependencies, introducing new prisma.config.ts configuration files, refactoring Prisma client initialization, updating TypeScript configurations, and revising documentation to reflect adapter-based setup and standard PostgreSQL terminology.

Changes

Cohort / File(s) Summary
Package dependency updates
orm/postgis-express/package.json, orm/script/package.json, orm/starter/package.json, orm/testing-express/package.json, orm/typedsql/package.json
Removed @prisma/extension-accelerate dependency across projects; replaced with adapter packages (@prisma/adapter-pg or @prisma/adapter-better-sqlite3). Updated Prisma-related versions to 6.18.0; adjusted dotenv version specifiers. Updated nanoid version in one project and removed prisma seed configuration blocks.
New Prisma configuration files
orm/postgis-express/prisma.config.ts, orm/prisma-mocking-javascript/prisma.config.ts, orm/script/prisma.config.ts, orm/starter/prisma.config.ts, orm/testing-express/prisma.config.ts, orm/typedsql/prisma.config.ts
Added new prisma.config.ts files across projects exporting configurations via defineConfig. Each specifies schema path, migrations directory, engine type (classic), and datasource URL sourced from environment variables.
Prisma client adapter-based initialization
orm/script/script.ts, orm/starter/src/index.ts, orm/testing-express/prisma/seed.ts, orm/testing-express/src/app.ts, orm/typedsql/prisma/seed.ts, orm/typedsql/src/index.ts
Replaced extension-based PrismaClient setup ($extends(withAccelerate())) with adapter-based initialization. Imports changed from withAccelerate to adapter packages (PrismaPg, PrismaBetterSQLite3). PrismaClient now instantiated with { adapter: pool } option.
TypeScript configuration updates
orm/script/tsconfig.json, orm/starter/tsconfig.json
Added module: "ESNext", moduleResolution: "node", and resolveJsonModule: true to compiler options.
Prisma schema updates
orm/typedsql/prisma/schema.prisma
Added engineType = "client" to the generator block.
Documentation updates
orm/script/README.md, orm/testing-express/README.md, orm/starter/README.md, orm/typedsql/README.md
Updated terminology from "Prisma Postgres" to "PostgreSQL"; replaced Accelerate extension guidance with adapter-based setup instructions; updated database URL examples to standard PostgreSQL format; removed extension-specific setup steps; updated table references and file paths in examples.

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant PrismaClient as PrismaClient
    participant Adapter as Driver Adapter<br/>(PrismaPg/<br/>PrismaBetterSQLite3)
    participant DB as Database

    rect rgb(200, 220, 240)
    Note over App,DB: Old Flow (Extension-based)
    App->>PrismaClient: new PrismaClient()
    PrismaClient->>PrismaClient: $extends(withAccelerate())
    PrismaClient->>DB: Execute query
    end

    rect rgb(220, 240, 200)
    Note over App,DB: New Flow (Adapter-based)
    App->>Adapter: new PrismaPg({connectionString})
    App->>PrismaClient: new PrismaClient({adapter})
    PrismaClient->>Adapter: Request connection
    Adapter->>DB: Execute query
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Specific areas requiring attention:
    • Adapter initialization logic in each project file (script.ts, seed.ts, src/index.ts, src/app.ts) to ensure correct pool/adapter setup with proper environment variable handling
    • New prisma.config.ts files across six projects to verify consistent schema paths, migrations directories, and datasource configurations
    • Package.json dependency replacements to confirm no missing or incompatible versions
    • Documentation updates to verify accuracy of adapter-based setup instructions and URL examples

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 captures the main changes: updating example projects with prisma.config.ts files and replacing the Prisma Accelerate extension with adapter-based approaches across multiple directories.

📜 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 9d8a0bc and f8749c9.

📒 Files selected for processing (2)
  • orm/postgis-express/package.json (1 hunks)
  • orm/testing-express/package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • orm/testing-express/package.json
  • orm/postgis-express/package.json
⏰ 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). (19)
  • GitHub Check: test (orm/clerk-nextjs)
  • GitHub Check: test (orm/ai-sdk-nextjs)
  • GitHub Check: test (orm/astro)
  • GitHub Check: test (orm/authjs-nextjs)
  • GitHub Check: test (orm/betterauth-nextjs)
  • GitHub Check: test (orm/betterauth-astro)
  • GitHub Check: test (orm/graphql-nexus)
  • GitHub Check: test (orm/graphql)
  • GitHub Check: test (orm/hapi-graphql-sdl-first)
  • GitHub Check: test (orm/grpc)
  • GitHub Check: test (orm/nest-graphql)
  • GitHub Check: test (orm/nest-graphql-sdl-first)
  • GitHub Check: test (orm/nextjs)
  • GitHub Check: test (orm/nest)
  • GitHub Check: test (orm/react-router-7)
  • GitHub Check: test (orm/nuxt)
  • GitHub Check: test (orm/nextjs-graphql)
  • GitHub Check: test (orm/solid-start)
  • GitHub Check: test (orm/sveltekit)

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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 2, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 2, 2025
mhartington
mhartington previously approved these changes Nov 3, 2025
@AmanVarshney01 AmanVarshney01 changed the base branch from latest to prisma-7 November 7, 2025 11:41
@AmanVarshney01 AmanVarshney01 merged commit c2f05fe into prisma-7 Nov 14, 2025
41 of 47 checks passed
@AmanVarshney01 AmanVarshney01 deleted the dc-5477-prisma-examples-update-misc-examples-22 branch November 14, 2025 04:48
AmanVarshney01 added a commit that referenced this pull request Nov 19, 2025
* Update all accelerate example (#8373)

* Update misc examples (#8372)

* Update misc examples with prisma.config.ts and adapter (#8362)

* Update HTTP web server examples (#8354)

* update all nextjs examples in `generator-prisma-client/` (#8342)

* Update fullstack examples with prisma config and pg adapter (#8344)

Co-authored-by: Nurul Sundarani <sundarani@prisma.io>

* Update Nuxt & React Router examples (#8368)

* Update optimize examples (#8375)

* Update Bun & Deno examples (#8343)

* Update GraphQL examples with prisma.config.ts and pg adapter (#8345)

* update cockroachdb, postgresql-supabase, prisma-postgres examples (#8374)

* remove engine classic and url from schema.prisma

* update deployment

* update readme

* delete all lock files and update prisma version to 7.0.0

* update remaining examples

* update d1 example

* fix

* update turso example

* fix

* update nuxt example

* fix nextjs example

* update all deps to 7.0.0

* fix

---------

Co-authored-by: Nurul Sundarani <sundarani@prisma.io>
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.

3 participants