Add documentation for map argument on Prisma indexes and constraints
Summary by CodeRabbit
-
Documentation
- Added documentation on the
mapargument for indexes and constraints to specify custom database names - Includes practical Prisma schema examples with corresponding SQL translations
- Clarifies
mapavailability across @id, @@id, @unique, @@unique, and @@index directives for all supported databases
- Added documentation on the
✏️ Tip: You can customize this high-level summary in your review settings.
Dangerous URL check
No absolute URLs to prisma.io/docs found. No local URLs found.
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
| original | preview |
|---|---|
| content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx | content/200-orm/100-prisma-schema/20-data-model/30-indexes.mdx |
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.
Deploying docs with
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 |