Skip to content

Conversation

@SimeonGriggs
Copy link

@SimeonGriggs SimeonGriggs commented Jan 12, 2026

Summary

PlanetScale offers PostgreSQL databases in addition to our MySQL (Vitess) offering.

Changes

  • New pages:

    • Main PlanetScale Postgres database guide (content/200-orm/050-overview/500-databases/855-planetscale-postgres.mdx)
    • Quickstart guide (content/100-getting-started/02-prisma-orm/100-quickstart/605-planetscale-postgres.mdx)
    • Add to existing project guide (content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx)
  • Updated pages:

    • Renamed existing PlanetScale pages to "PlanetScale MySQL" for clarity
    • Updated cross-references between MySQL and Postgres guides
    • Added PlanetScale Postgres entries to sidebar
    • Fixed "Planetscale" → "PlanetScale" case sensitivity issues

Summary by CodeRabbit

  • Documentation
    • Added comprehensive quickstart guide for PlanetScale Postgres with setup, configuration, and example queries.
    • Added integration guide for adding Prisma ORM to existing PlanetScale Postgres projects.
    • Clarified documentation by distinguishing between PlanetScale MySQL and PlanetScale Postgres variants with dedicated guides.
    • Updated navigation and sidebar labels for consistency and clarity.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add new PlanetScale Postgres database guide with connection pooling, branching, and replica information
- Add PlanetScale Postgres quickstart guide
- Add PlanetScale Postgres add-to-existing-project guide
- Rename existing PlanetScale pages to 'PlanetScale MySQL' for clarity
- Update sidebar with new PlanetScale Postgres entries
- Fix 'Planetscale' -> 'PlanetScale' case sensitivity issues
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Walkthrough

This PR introduces comprehensive documentation for PlanetScale Postgres while disambiguating existing PlanetScale documentation as "PlanetScale MySQL". It adds four new quickstart and integration guides, updates sidebar navigation, corrects capitalization inconsistencies, and establishes cross-references between MySQL and Postgres variants.

Changes

Cohort / File(s) Summary
Getting Started Quickstart Guides
content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx, content/100-getting-started/02-prisma-orm/100-quickstart/605-planetscale-postgres.mdx
Updated existing MySQL guide title to specify "PlanetScale MySQL"; added new 300+ line PlanetScale Postgres quickstart with prerequisites, ESM configuration, Prisma initialization, connection setup (direct vs PgBouncer), data models, migrations, and example queries.
Existing Project Integration Guides
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx, content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx
Updated existing MySQL guide sidebar label; added new 279+ line guide for integrating Prisma into existing PlanetScale Postgres projects with introspection, baselining, driver adapter setup, and data evolution.
Database Overview Documentation
content/200-orm/050-overview/500-databases/850-planetscale.mdx, content/200-orm/050-overview/500-databases/855-planetscale-postgres.mdx
Updated PlanetScale MySQL overview with clarification note; added new 141+ line comprehensive PlanetScale Postgres overview covering features, connection pooling, Prisma integration patterns, and serverless client instantiation.
Configuration & Reference
sidebars.ts, src/data/indexData.ts, content/300-accelerate/900-compare.mdx
Updated sidebar labels from "PlanetScale" to "PlanetScale MySQL" with new "PlanetScale Postgres" entries; fixed capitalization of "PlanetScale" across comparison tables and index data.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

The PR spans multiple documentation files with substantive new content (~720 lines across new guides), but follows consistent structural patterns. Review effort centers on verifying technical accuracy, link validity, code example correctness, and consistency across the MySQL/Postgres documentation pairs rather than logic complexity.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly reflects the primary objective of the PR—adding comprehensive documentation for PlanetScale Postgres integration, which is evidenced by three new guide files and extensive sidebar updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
content/200-orm/050-overview/500-databases/855-planetscale-postgres.mdx (1)

114-120: Consider using template literal pattern for connection string consistency.

Based on learnings from similar documentation, the Prisma docs convention for driver adapter examples uses the template literal pattern for environment variable access:

-const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
+const connectionString = `${process.env.DATABASE_URL}`
+const adapter = new PrismaPg({ connectionString })

This maintains consistency with other database adapter examples (PostgreSQL, MySQL/MariaDB) throughout the documentation.

content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx (1)

105-107: Consider using a placeholder for the database name.

The connection string uses postgres as a hardcoded database name while other values use placeholder syntax. For consistency and to avoid confusion, consider using a placeholder:

-DATABASE_URL="postgresql://{username}:{password}@{host}:6432/postgres?sslmode=verify-full"
+DATABASE_URL="postgresql://{username}:{password}@{host}:6432/{database}?sslmode=verify-full"

This helps users understand they should replace this with their actual database name from PlanetScale.

content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx (1)

130-140: Consider using the template literal pattern for connection string consistency.

Based on learnings, the Prisma docs convention for driver adapter examples uses the template literal pattern for environment variables. The current code passes process.env.DATABASE_URL directly to the adapter options object. While functionally equivalent, using the template literal maintains consistency across all database adapter examples in the documentation.

📝 Suggested change for consistency
 import "dotenv/config";
 import { PrismaPlanetScale } from '@prisma/adapter-planetscale'
 import { PrismaClient } from '../generated/prisma/client'
 import { fetch as undiciFetch } from 'undici'

-const adapter = new PrismaPlanetScale({ url: process.env.DATABASE_URL, fetch: undiciFetch })
+const connectionString = `${process.env.DATABASE_URL}`
+
+const adapter = new PrismaPlanetScale({ url: connectionString, fetch: undiciFetch })
 const prisma = new PrismaClient({ adapter })

 export { prisma }
content/100-getting-started/02-prisma-orm/100-quickstart/605-planetscale-postgres.mdx (2)

53-68: Consider adding a brief explanation for ignoreDeprecations.

The ignoreDeprecations: "6.0" setting in tsconfig may puzzle readers unfamiliar with TypeScript 5.x deprecation warnings for moduleResolution: "node". A short inline comment or note explaining why this is needed would help developers understand this isn't a red flag.


199-214: Clarify that migrate dev already runs generate automatically.

The current text shows running prisma migrate dev (Line 204) followed by a separate prisma generate (Line 212). Since Prisma 3.x+, migrate dev automatically runs generate after successful migration. Running it again is harmless but redundant. You could either remove the explicit generate step or clarify it's optional/for emphasis.

📝 Suggested clarification
 This command creates the database tables based on your schema.

-Now run the following command to generate the Prisma Client:
+The `migrate dev` command automatically generates Prisma Client after applying migrations. If you need to regenerate manually (e.g., after schema changes without migration), run:

 ```terminal
 npx prisma generate
</details>

</blockquote></details>
<details>
<summary>content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx (1)</summary><blockquote>

`212-222`: **Same template literal pattern note as the add-to-existing guide.**

For consistency with other database adapter examples in the Prisma docs (and with the new Postgres quickstart in this PR which does use the pattern), consider using the template literal approach here as well.

Based on learnings, the convention is `const connectionString = \`${process.env.DATABASE_URL}\``.


<details>
<summary>📝 Suggested change for consistency</summary>

```diff
 import "dotenv/config";
 import { PrismaPlanetScale } from '@prisma/adapter-planetscale'
 import { PrismaClient } from '../generated/prisma/client'
 import { fetch as undiciFetch } from 'undici'

-const adapter = new PrismaPlanetScale({ url: process.env.DATABASE_URL, fetch: undiciFetch })
+const connectionString = `${process.env.DATABASE_URL}`
+
+const adapter = new PrismaPlanetScale({ url: connectionString, fetch: undiciFetch })
 const prisma = new PrismaClient({ adapter })

 export { prisma }
📜 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 776bb74 and 88b0eb4.

📒 Files selected for processing (9)
  • content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx
  • content/100-getting-started/02-prisma-orm/100-quickstart/605-planetscale-postgres.mdx
  • content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx
  • content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx
  • content/200-orm/050-overview/500-databases/850-planetscale.mdx
  • content/200-orm/050-overview/500-databases/855-planetscale-postgres.mdx
  • content/300-accelerate/900-compare.mdx
  • sidebars.ts
  • src/data/indexData.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-06T22:06:57.725Z
Learnt from: newclarityex
Repo: prisma/docs PR: 7425
File: content/200-orm/050-overview/500-databases/400-mysql.mdx:80-80
Timestamp: 2026-01-06T22:06:57.725Z
Learning: In Prisma docs, when showing examples of instantiating driver adapters with connection strings from environment variables, use the template literal pattern `const connectionString = `${process.env.DATABASE_URL}`` for consistency across all database adapter examples (PostgreSQL, MySQL/MariaDB, etc.).

Applied to files:

  • content/200-orm/050-overview/500-databases/855-planetscale-postgres.mdx
  • content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx
  • content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx
  • content/100-getting-started/02-prisma-orm/100-quickstart/605-planetscale-postgres.mdx
  • content/300-accelerate/900-compare.mdx
  • content/200-orm/050-overview/500-databases/850-planetscale.mdx
  • content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx
🪛 LanguageTool
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx

[style] ~228-~228: Consider shortening or rephrasing this to strengthen your wording.
Context: ...pt.ts ``` ## 9. Evolve your schema To make changes to your database schema: ### 9.1. Update ...

(MAKE_CHANGES)

🔇 Additional comments (14)
content/300-accelerate/900-compare.mdx (1)

31-31: Capitalization corrections look good.

These changes properly align the "PlanetScale" brand name with the correct casing throughout the comparison tables. Consistent branding across documentation is important for professionalism and searchability.

Also applies to: 102-102

content/200-orm/050-overview/500-databases/855-planetscale-postgres.mdx (1)

1-141: Well-structured documentation for PlanetScale Postgres.

This is a solid addition to the Prisma docs. The document effectively:

  • Distinguishes between PlanetScale Postgres and MySQL variants with clear cross-references
  • Explains the PostgreSQL-compatible nature and standard postgresql provider usage
  • Documents the dual connection approach (direct vs PgBouncer) with a helpful comparison table
  • Provides complete code examples for schema and client setup

The note block at lines 13-17 is particularly helpful for users who may land on the wrong guide.

content/100-getting-started/02-prisma-orm/200-add-to-existing-project/605-planetscale-postgres.mdx (2)

182-193: Good adherence to documentation conventions.

The Prisma Client instantiation correctly uses the template literal pattern for the connection string as per documentation standards:

const connectionString = `${process.env.DATABASE_URL}`

This maintains consistency with other database adapter examples across the Prisma docs.


1-279: Comprehensive add-to-existing-project guide.

This guide provides excellent step-by-step coverage for integrating Prisma ORM with an existing PlanetScale Postgres project. The workflow is logical:

  1. Set up dependencies
  2. Initialize Prisma
  3. Connect database
  4. Introspect existing schema
  5. Baseline for migrations
  6. Generate client and query

The baselining section (lines 142-166) is particularly valuable for users migrating existing databases, as this is often a point of confusion.

content/200-orm/050-overview/500-databases/850-planetscale.mdx (1)

2-15: Clear disambiguation between PlanetScale MySQL and Postgres.

The title change to "PlanetScale MySQL" and the added note block effectively distinguish this guide from the new PlanetScale Postgres documentation. This is the right approach—users searching for PlanetScale guidance will now clearly understand which guide applies to their database variant.

The note at lines 11-15 provides a helpful redirect for users who may have landed here while using PlanetScale Postgres.

src/data/indexData.ts (1)

179-179: Brand name capitalization corrected.

The tech label now correctly displays "PlanetScale" with proper casing. This ensures the UI matches the updated documentation and official brand spelling.

content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx (1)

2-3: LGTM on the title and cross-reference updates.

The renaming to "PlanetScale MySQL" and the updated note correctly directing users to the new PlanetScale Postgres guide are well done. This establishes clear disambiguation between the two PlanetScale offerings.

Also applies to: 16-17

content/100-getting-started/02-prisma-orm/100-quickstart/605-planetscale-postgres.mdx (3)

1-19: Well-structured frontmatter and introduction.

The metadata is complete, and the cross-reference note to the MySQL guide mirrors the pattern used in the MySQL guide pointing back here. This bidirectional linking helps users find the right documentation.


219-230: LGTM on Prisma Client instantiation.

The code correctly uses the @prisma/adapter-pg with PrismaPg, and follows the template literal pattern for the connection string as per documentation conventions.


130-148: Helpful connection type table.

The table clearly distinguishing Direct (5432) vs PgBouncer (6432) ports with their use cases is excellent. This prevents a common pitfall where developers use pooled connections for migrations, which can cause issues.

sidebars.ts (3)

107-115: LGTM on quickstart sidebar updates.

The existing PlanetScale entry is correctly relabeled to "PlanetScale MySQL" and the new "PlanetScale Postgres" entry follows with the correct doc ID. The ordering (MySQL before Postgres) maintains backward compatibility for existing users.


168-176: LGTM on add-to-existing-project sidebar updates.

Mirrors the quickstart pattern correctly, maintaining consistency across both getting-started paths.


510-510: Formatting-only change, no semantic impact.

The AI tutorials items array was reformatted to a single line. No functional change.

content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx (1)

2-3: LGTM on MySQL quickstart title and cross-reference.

The renaming to "PlanetScale MySQL" and the note pointing to the Postgres quickstart are correct. The bidirectional linking between MySQL and Postgres guides creates a good user experience.

Also applies to: 17-17

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