Task: Draw the ER diagrams as SVG
Table of Contents
This page documents a task in the Split the ER diagram by group story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
The diagrams ship as vector files and no environment-specific raster or image map stays in git.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Split the ER diagram by group |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-09 |
3. Acceptance
- The draw step emits SVG; ores_schema.png and ores_schema.cmapx are deleted and untracked.
- The CMake target, the script and the Java arguments produce the vector output.
- The conventions doc and the memory note stop telling a reader to leave the PNG and cmapx alone.
4. Plan
(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's * Decisions at close, but the
plan itself stays — it is the historical record of what we did.)
5. Measurements
Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an evidence/ file beside the
task and name that file in the Command column.
| What | Value | Command | Commit |
|---|---|---|---|
| Diagrams drawn as SVG | 22, exit 0 | plantuml -tsvg ores_schema*.puml |
adc5954e60 |
| SVG total size | 4.5 MB | du -ch ores_schema*.svg |
adc5954e60 |
| PNG or cmapx written by a draw | 0 | ls ores_schema*.png ores_schema*.cmapx |
adc5954e60 |
| CMake target | exit 0, 22 SVGs redrawn | compass build generate_ores_schema_diagram |
- |
| Tracked images after this task | 22 SVGs, 4.5 MB | git ls-files 'projects/ores.sql/modeling/*' |
- |
| er-diagram, codegen-tests, org-links, cmake-sources | 4/4 passed | compass check --only er-diagram --only codegen-tests --only org-links --only cmake-sources |
- |
6. Notes
7. Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
8. PRs
| PR | Title |
|---|---|
| #2939 | [codegen,sql,doc] Draw the ER diagrams as SVG |
9. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
10. Result
The drawing step emits SVG and every generated diagram is drawn, not only
the index: the script expands ores_schema*.puml and the CMake target
does the same through bash -c, because CMake cannot expand a glob in a
COMMAND and the file set has to follow the model rather than a list
kept in the build description. 22 diagrams draw in one pass, 4.5 MB in
total, and a pass writes no PNG and no cmapx.
ores_schema.png and ores_schema.cmapx are deleted from the index. The
SVGs that replace them are committed: they are what the documentation
site renders, through proj: links that export as image tags pointing at
the file in the repository, so an image outside the tree is a broken
page. The first cut of this task ignored them, which would have published
a schema page with no schema on it.
ORES_JAVA_ARGS is shared with the sixteen component diagrams that still
draw PNGs, so it keeps PLANTUML_LIMIT_SIZE; the ER target passes it
through and adds -tsvg. The script's own invocation drops the limit,
since a vector has no pixel count to overflow, and its java fallback does
the same.
The conventions doc names the drawn files, links the index and every group image so the site shows them, and the memory note now counts the SVGs among the addresses a model change has to regenerate.