docs icon indicating copy to clipboard operation
docs copied to clipboard

Add documentation for map argument on Prisma indexes and constraints

Open AmanVarshney01 opened this issue 1 month ago • 5 comments

Summary by CodeRabbit

  • Documentation
    • Added documentation on the map argument for indexes and constraints to specify custom database names
    • Includes practical Prisma schema examples with corresponding SQL translations
    • Clarifies map availability across @id, @@id, @unique, @@unique, and @@index directives for all supported databases

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

AmanVarshney01 avatar Dec 16 '25 12:12 AmanVarshney01

Dangerous URL check

No absolute URLs to prisma.io/docs found. No local URLs found.

github-actions[bot] avatar Dec 16 '25 12:12 github-actions[bot]

Walkthrough

This pull request adds documentation about the map argument for database index and constraint naming in Prisma schemas. New sections introduce practical examples demonstrating map usage on single-column indexes, composite indexes, and unique constraints, alongside PostgreSQL SQL translations.

Changes

Cohort / File(s) Summary
Documentation Enhancement
content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx
Introduces map argument documentation for customizing database names on @id, @@id, @unique, @@unique, and @@index directives. Adds schema examples with corresponding PostgreSQL SQL output demonstrating practical application across single and composite indexes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • PostgreSQL SQL translations: Verify the generated SQL examples accurately reflect Prisma's behavior across supported databases
  • Example clarity: Confirm examples cover edge cases and are internally consistent with other documentation patterns
  • Cross-database coverage: Ensure claims about support across all databases are accurate and not database-specific limitations are documented

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately captures the main change: adding documentation for the map argument on Prisma indexes and constraints, which aligns perfectly with the content modifications shown in the raw summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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] avatar Dec 16 '25 12:12 coderabbitai[bot]

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

github-actions[bot] avatar Dec 16 '25 12:12 github-actions[bot]

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: ea8b9ea
Status: ✅  Deploy successful!
Preview URL: https://5ae48cac.docs-51g.pages.dev
Branch Preview URL: https://dr-5506-document-the-map-att.docs-51g.pages.dev

View logs