Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “Database Schema Reference” documentation set for Operaton schema v7.24 (including an ER diagram source and per-domain reference pages), and adds supporting Mermaid rendering tooling/scripts plus related “superpowers” design/plan documents.
Changes:
- Added DB schema reference docs under
docs/documentation/reference/db-schema/(index + domain pages) and an ER diagram source (schema.mermaid). - Added Mermaid initialization scripts and Mermaid-related dependencies intended to enable Mermaid rendering in Docusaurus.
- Added/updated “superpowers” specs and implementation plans for DB schema reference docs and automated version updates.
Reviewed changes
Copilot reviewed 17 out of 22 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| static/mermaid-init.js | Adds a client-side script to convert language-mermaid code blocks into rendered Mermaid diagrams. |
| src/mermaid-loader.js | Adds a client-side Mermaid initializer/re-initializer intended for SPA navigation. |
| package.json | Adds Mermaid + Docusaurus Mermaid theme dependencies. |
| docusaurus.config.ts | Minor formatting changes; relevant location to wire Mermaid theme/loading. |
| docs/superpowers/specs/2026-06-09-db-schema-reference-design.md | Adds an approved design spec for modular DB schema reference docs. |
| docs/superpowers/specs/2026-05-29-automated-version-updates-design.md | Adds an approved design spec for automated doc version updates. |
| docs/superpowers/plans/2026-06-09-db-schema-reference-implementation.md | Adds a detailed implementation plan for the DB schema reference docs. |
| docs/superpowers/plans/2026-05-29-automated-version-updates.md | Adds a detailed implementation plan for automated version updates. |
| docs/documentation/reference/db-schema/schema.mermaid | Adds the Mermaid ER diagram source for the schema. |
| docs/documentation/reference/db-schema/index.md | Adds the DB schema reference landing page, quick reference, and diagram link. |
| docs/documentation/reference/db-schema/general.md | Adds documentation for ACT_GE_* tables. |
| docs/documentation/reference/db-schema/repository.md | Adds documentation for ACT_RE_* tables. |
| docs/documentation/reference/db-schema/runtime.md | Adds documentation for ACT_RU_* tables, indexes, and example queries. |
| docs/documentation/reference/db-schema/history.md | Adds documentation for ACT_HI_* tables. |
| docs/documentation/reference/db-schema/identity.md | Adds documentation for ACT_ID_* tables. |
| .devenv/scripts/schema-theme.css | Adds CSS to theme the rendered Mermaid ER diagram by domain. |
| .devenv/scripts/render-schema.sh | Adds a helper script to render schema.mermaid to SVG/PNG using npx mermaid-cli. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+9
| window.mermaid.initialize({ | ||
| startOnLoad: true, | ||
| theme: 'default', | ||
| securityLevel: 'loose', | ||
| }); |
Comment on lines
+1
to
+3
| // Initialize Mermaid diagrams when the page loads | ||
| if (typeof window !== 'undefined') { | ||
| const initMermaid = () => { |
|
|
||
| function waitForMermaid(attempts) { | ||
| if (typeof window.mermaid !== 'undefined') { | ||
| window.mermaid.initialize({ startOnLoad: false, theme: 'default', securityLevel: 'loose' }); |
Comment on lines
+1
to
+4
| // Mermaid initialization for Docusaurus | ||
| // Docusaurus renders mermaid blocks as <pre><code class="language-mermaid">, | ||
| // but Mermaid.js expects <div class="mermaid">. This script converts them. | ||
| (function () { |
Comment on lines
20
to
22
| "@docusaurus/preset-classic": "3.10.1", | ||
| "@docusaurus/theme-mermaid": "^3.10.1", | ||
| "@mdx-js/react": "^3.1.1", |
| | HANDLER_TYPE_ | VARCHAR(255) | NULL | Handler class/type | | ||
| | HANDLER_CFG_ | VARCHAR(4000) | NULL | Handler configuration | | ||
| | DEPLOYMENT_ID_ | VARCHAR(64) | NULL | Associated deployment | | ||
| | SUSPENSION_STATE_ | INTEGER | NOT NULL DEFAULT 1 | `1`=active, `0`=suspended | |
| @@ -0,0 +1,117 @@ | |||
| Rem# Design: Automated Version Updates on Operaton Release | |||
Comment on lines
+10
to
+12
| ## Architecture | ||
| 3 | ||
| Three parts: |
Comment on lines
+96
to
+99
| **Files:** | ||
| - Create: `docs/reference/db-schema/_schema-analysis.txt` (temporary working file) | ||
| - Source: `/Users/kthoms/Development/git/operaton/operaton/engine/src/main/resources/org/operaton/bpm/engine/db/create/` | ||
|
|
Comment on lines
+102
to
+105
| Run: | ||
| ```bash | ||
| cat /Users/kthoms/Development/git/operaton/operaton/engine/src/main/resources/org/operaton/bpm/engine/db/create/activiti.postgres.create.engine.sql | grep "^create table" | sed 's/create table //' | sed 's/ (.*//' | sort | ||
| ``` |
Replace mmdc Mermaid renderer with Graphviz pipeline: - Add mermaid-to-dot.py: converts schema.mermaid to schema.dot - schema.dot: subgraph cluster per domain (GE/RE/RU/HI/ID) with dotted color-coded borders, splines=ortho for rectangular edge routing, HTML-table entity nodes with PK/FK badges, self-referential edges dashed - Update render-schema.sh: python3 → mermaid-to-dot.py → dot → SVG/PNG - Regenerate schema.svg (582 KB vs 2 MB with mmdc) schema.mermaid is kept unchanged for GitHub inline preview. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a chapter "DB schema" as reference documentation with detailed description of each domain and table.