Commit 72b597d
authored
docs: Correct production DB target - CockroachDB not Postgres (#2129)
* docs: Correct production database target in data model doc
The previous version stated Meridian's deployment target was Postgres 16,
which was incorrect. Production targets CockroachDB; Postgres is used in
develop and demo only. Migrations and runtime SQL are written to the
common subset of both, which is why the compatibility rules in ADR-0003
are binding for all new migrations, not historical artefacts.
* docs: Add Mermaid ER diagrams to data model reference
Adds per-service ER diagrams and a cross-service logical reference
flowchart so the data model can be read visually. Covers platform tier,
party, identity, current/internal account, position-keeping, financial
accounting, reference data, payment order and billing, market
information, reconciliation, and operational gateway.
* docs: Address review feedback on data model doc
- Clarify that Atlas validates against Postgres 16, so CockroachDB
compatibility is enforced by developer discipline and code review
rather than automated tooling (coderabbitai, claude[bot])
- Correct party_type_definition field names: party_type, attribute_schema,
validation_cel, eligibility_cel (not code/json_schema/cel_expression)
- Correct current_account.account field names: account_id and
account_identification are the identifier columns, not account_number
- Correct lien field names: amount_cents (bigint) and
payment_order_reference (varchar), not decimal amount and uuid FK
- Update cross-service flow label accordingly
* docs: Fill ER diagram attribute blocks with canonical schema
Every entity referenced in an ER diagram now has an attribute block so
there are no empty boxes. Column names and types are taken from the
canonical Atlas migrations in services/<service>/migrations/ - the
source of truth for what develop/demo will look like once deployed.
Also cross-validated against the live demo Postgres where tables are
present (demo is currently lagging develop for some reference-data and
control-plane tables, so migrations remain authoritative).
Each block shows the ~8-10 most meaningful columns; housekeeping
columns (created_at, updated_at, created_by, version, etc.) are
omitted unless they carry domain meaning (e.g. valid_from/valid_to
on bi-temporal market data, revoked_at on api_key).
* docs: Apply internal-account rename + fix cross-service flow labels
Missed two migrations in the prior schema pass (claude[bot] review):
- PR-era 2026-02-25: internal_bank_account renamed to internal_account,
internal_bank_account_status_history to internal_account_status_history,
correspondent_bank_* to counterparty_*
- PR-era 2026-03-06: internal-account lien.currency renamed to
instrument_code
Also fix cross-service flowchart edge labels that referred to columns
that do not exist (balance_ref, counterparty_party_id) or used renamed
names (account_type_code, asset_code, dataset). Replace balance_ref
with account_id and drop the IBA to party edge since internal_account
holds a varchar counterparty identifier, not a direct party FK.
* docs: Fix Mermaid parse error - invalid PK_FK constraint
Mermaid erDiagram supports only one constraint per attribute (PK, FK,
or UK). Used PK with a descriptive comment instead of the invalid
combined PK_FK token, which was breaking GitHub's Mermaid renderer.
---------
Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>1 parent 7964e77 commit 72b597d
2 files changed
Lines changed: 768 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | | - | |
| 492 | + | |
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| |||
0 commit comments