Add Database Schema Documentation with ER Diagrams#11524
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR introduces a "Data Dictionary" documentation section under the WSO2 API Manager database setup guide. It adds 14 new Markdown pages, each documenting a functional category of database tables: API Management Core, Subscription and Application, Throttling and Policy, Gateway and Runtime, Key Management and Miscellaneous, Identity, Identity Provider, Service Provider, User Management, Registry, Workflow, Consent Management, Governance, and FIDO. Each page lists the tables belonging to that category along with per-table descriptions and column-level attribute definitions. The 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (4)
en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/gateway-and-runtime-related-tables.md (1)
1-7: 🧹 Nitpick | 🔵 TrivialThis file exhibits the same heading hierarchy issue. Apply the same recommended fix as documented above for consistent structure across the data dictionary layer.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/gateway-and-runtime-related-tables.md` around lines 1 - 7, The markdown file has an inconsistent heading hierarchy where the main title "Gateway and Runtime Related Tables" uses H1 (#) but the table section "AM_API_ENVIRONMENT_KEYS" jumps directly to H3 (###), skipping H2. Fix this by changing the AM_API_ENVIRONMENT_KEYS heading from H3 (###) to H2 (##) to maintain a consistent and proper heading hierarchy throughout the document, matching the structure applied in other data dictionary files.en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/throttling-and-policy-related-tables.md (1)
1-7: 🧹 Nitpick | 🔵 TrivialThis file exhibits the same heading hierarchy issue as the previous file. See the consolidated recommendation above.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/throttling-and-policy-related-tables.md` around lines 1 - 7, The markdown file has inconsistent heading hierarchy where the level 1 heading "Throttling and Policy Related Tables" is followed directly by a level 3 heading "AM_API_POLICY_MAPPING", skipping level 2. Fix this by changing all level 3 headings (###) that appear as direct children of the level 1 heading to level 2 headings (##) to maintain proper heading hierarchy throughout the document.en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/subscription-and-application-related-tables.md (1)
1-7: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winStandardize heading hierarchy to follow Markdown best practices.
All three data dictionary files jump directly from h1 (main title) to h3 (table sections), skipping the h2 level. This violates the MD001 rule (heading levels should increment by one). To maintain proper document structure and improve readability in table of contents, introduce an h2 heading between the title and table sections. This can be applied consistently across all files in this documentation layer.
📋 Suggested fix for heading hierarchy
For each file, add an h2 heading after the h1 title to bridge the hierarchy:
# Subscription and Application Related Tables +## Tables + This section lists out all the subscription and application related tables...Alternatively, change all h3 table headings to h2:
-### AM_API_KEY_APPLICATION_MAPPING +## AM_API_KEY_APPLICATION_MAPPINGApply the same pattern across all data dictionary files for consistency.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/subscription-and-application-related-tables.md` around lines 1 - 7, The document violates proper Markdown heading hierarchy by jumping from h1 (Subscription and Application Related Tables) directly to h3 (AM_API_KEY_APPLICATION_MAPPING), skipping the h2 level. Add an h2 heading between the main title and the AM_API_KEY_APPLICATION_MAPPING section to create a proper hierarchy that increments by one level (h1 to h2 to h3). Apply this same heading structure fix consistently across all three data dictionary files for uniformity.en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/fido-related-tables.md (1)
32-32: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winUse "who" instead of "that" for person reference.
Line 32 reads: "an opaque identifier for the user that does not reveal the username." The relative pronoun should be "who" when referring to a person, not "that."
Suggested correction
-| USER_HANDLE | Primary key (composite). The WebAuthn user handle, an opaque identifier for the user that does not reveal the username. | +| USER_HANDLE | Primary key (composite). The WebAuthn user handle, an opaque identifier for the user who does not reveal the username. |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/fido-related-tables.md` at line 32, In the USER_HANDLE row description on line 32, change the relative pronoun from "that" to "who" in the phrase describing the user handle. The sentence currently reads "an opaque identifier for the user that does not reveal the username" and should be updated to use "who" instead of "that" since it refers to a person (the user), following the grammar rule that "who" is used for person references and "that" for things.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/api-management-core-related-tables.md`:
- Around line 1-7: The document violates Markdown heading hierarchy by jumping
from the h1 heading "API Management Core Related Tables" directly to the h3
heading "AM_API" without an intermediate h2 level. Add an h2 heading between the
introductory section and the first table definition to establish proper heading
structure. Insert a heading like "## Tables" or "## Table Definitions" before
the "### AM_API" section to fix the hierarchy.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/governance-related-tables.md`:
- Around line 1-7: Fix the markdown heading hierarchy by changing all h3
headings (###) to h2 headings (##) for the governance table sections. The
document currently jumps from the h1 main title to h3 level headings for tables
like GOV_ARTIFACT and subsequent tables, which violates proper markdown
hierarchy conventions. Replace all instances of ### with ## for every table
heading throughout the document to ensure consistent and proper heading levels
between the main h1 title and the individual table headings.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/identity-related-tables.md`:
- Around line 1-10: The document has an improper heading hierarchy that violates
Markdown standards by jumping from h1 (# Identity Related Tables) directly to h3
headings (### IDN_APP_REVOKED_EVENT and other table sections). Fix this by
converting all table section headings from h3 (###) to h2 (##) to establish the
correct sequential hierarchy: h1 for the page title, then h2 for each individual
table section. Apply this same conversion pattern consistently across all five
related documentation files (identity-related-tables.md,
identity-provider-related-tables.md, service-provider-related-tables.md,
fido-related-tables.md, and consent-management-related-tables.md).
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/key-management-and-misc-related-tables.md`:
- Around line 1-7: The markdown document violates heading hierarchy by jumping
from h1 (the main title "Key Management and Miscellaneous Related Tables")
directly to h3 level headings for table names like AM_ALERT_EMAILLIST. Fix this
by converting all table-name headings from h3 (###) to h2 (##) format throughout
the document. This applies to all table section headings to create a consistent
two-level hierarchy that follows markdown conventions and ensures proper
document structure for navigation and table-of-contents generation.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/registry-related-tables.md`:
- Around line 1-7: The document violates markdown heading hierarchy (MD001) by
jumping from h1 level heading (Registry Related Tables) directly to h3 level
heading (REG_ASSOCIATION). Fix this by changing all table section headings from
h3 (###) to h2 (##) throughout the entire document to maintain proper heading
hierarchy progression from h1 to h2 to h3 and beyond. This includes the
REG_ASSOCIATION heading and all subsequent registry-related table headings in
the file.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/user-management-related-tables.md`:
- Around line 1-7: The markdown document has a heading hierarchy violation where
it jumps from h1 (the main title) directly to h3 (the table headings starting
with UM_ACCOUNT_MAPPING), skipping the h2 level. This breaks document structure
and affects accessibility and TOC generation. To fix this, replace all
occurrences of the three-hash heading marker (###) used for table headings
throughout the file with two-hash markers (##) to properly establish h2 level
headings. This change should be applied to all table section headings including
UM_ACCOUNT_MAPPING and all other table headings in the document to establish
proper heading hierarchy.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/workflow-related-tables.md`:
- Around line 1-7: The markdown heading hierarchy is broken because it jumps
from h1 (the main title) directly to h3 (### AM_WORKFLOWS) without using an h2
level in between. Fix this by changing all the table heading markers from ### to
## throughout the entire file, starting with the AM_WORKFLOWS heading and
continuing for all other table headings, to maintain proper markdown hierarchy
structure.
---
Nitpick comments:
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/fido-related-tables.md`:
- Line 32: In the USER_HANDLE row description on line 32, change the relative
pronoun from "that" to "who" in the phrase describing the user handle. The
sentence currently reads "an opaque identifier for the user that does not reveal
the username" and should be updated to use "who" instead of "that" since it
refers to a person (the user), following the grammar rule that "who" is used for
person references and "that" for things.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/gateway-and-runtime-related-tables.md`:
- Around line 1-7: The markdown file has an inconsistent heading hierarchy where
the main title "Gateway and Runtime Related Tables" uses H1 (#) but the table
section "AM_API_ENVIRONMENT_KEYS" jumps directly to H3 (###), skipping H2. Fix
this by changing the AM_API_ENVIRONMENT_KEYS heading from H3 (###) to H2 (##) to
maintain a consistent and proper heading hierarchy throughout the document,
matching the structure applied in other data dictionary files.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/subscription-and-application-related-tables.md`:
- Around line 1-7: The document violates proper Markdown heading hierarchy by
jumping from h1 (Subscription and Application Related Tables) directly to h3
(AM_API_KEY_APPLICATION_MAPPING), skipping the h2 level. Add an h2 heading
between the main title and the AM_API_KEY_APPLICATION_MAPPING section to create
a proper hierarchy that increments by one level (h1 to h2 to h3). Apply this
same heading structure fix consistently across all three data dictionary files
for uniformity.
In
`@en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/throttling-and-policy-related-tables.md`:
- Around line 1-7: The markdown file has inconsistent heading hierarchy where
the level 1 heading "Throttling and Policy Related Tables" is followed directly
by a level 3 heading "AM_API_POLICY_MAPPING", skipping level 2. Fix this by
changing all level 3 headings (###) that appear as direct children of the level
1 heading to level 2 headings (##) to maintain proper heading hierarchy
throughout the document.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e6c695bf-588b-44e8-8a5c-8699539b81d0
⛔ Files ignored due to path filters (21)
en/docs/assets/img/setup-and-install/data-dictionary/api-management-core-related-tables-1.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/api-management-core-related-tables-2.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/consent-management-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/fido-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/gateway-and-runtime-related-tables-1.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/gateway-and-runtime-related-tables-2.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/governance-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/identity-provider-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/identity-related-tables-1.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/identity-related-tables-2.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/identity-related-tables-3.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/key-management-and-misc-related-tables-1.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/key-management-and-misc-related-tables-2.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/registry-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/service-provider-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/subscription-and-application-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/throttling-and-policy-related-tables.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/user-management-related-tables-1.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/user-management-related-tables-2.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/user-management-related-tables-3.pngis excluded by!**/*.pngen/docs/assets/img/setup-and-install/data-dictionary/workflow-related-tables.pngis excluded by!**/*.png
📒 Files selected for processing (15)
en/docs/install-and-setup/setup/setting-up-databases/data-dictionary/api-management-core-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/consent-management-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/fido-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/gateway-and-runtime-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/governance-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/identity-provider-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/identity-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/key-management-and-misc-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/registry-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/service-provider-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/subscription-and-application-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/throttling-and-policy-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/user-management-related-tables.mden/docs/install-and-setup/setup/setting-up-databases/data-dictionary/workflow-related-tables.mden/mkdocs.yml
ecd955c to
4e81713
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
4e81713 to
7b13b7e
Compare
|
Can you crosscheck the GOV_ tables with https://github.com/wso2/carbon-apimgt/tree/master/components/apimgt/org.wso2.carbon.apimgt.governance.impl/src/main/java/org/wso2/carbon/apimgt/governance/impl db access implementation as well |
Purpose
The 4.7.0 documentation had no data dictionary for the product database schema. Users had no reference for the tables, columns, and relationships that make up the databases, making it difficult to understand the data model when configuring, troubleshooting, or integrating with them.
Goals
install-and-setup/setup/setting-up-databases/data-dictionary, split into 14 domain-based pages (API management core, subscriptions, throttling, gateway/runtime, key management, workflow, consent, governance, FIDO, identity, identity provider, service provider, registry, and user management).mkdocs.ymlso they are reachable from the docs navigation.