Centralize structural command transactions

This commit is contained in:
2026-07-26 11:14:24 +02:00
parent d23e7d990c
commit 266bdb4749
9 changed files with 112 additions and 128 deletions
+7
View File
@@ -84,6 +84,13 @@ absteigend paginierte Revisions-Timeline ist ohne Befehls-Payloads über
`GET /api/projects/:projectId/history/revisions` lesbar. Ein zentraler
Dispatcher führt die nachfolgend beschriebenen typisierten Kommandos über
öffentliche Command-, Undo- und Redo-Endpunkte aus.
Die Identitäts-/Struktur-Stores für Circuit, CircuitDeviceRow,
DistributionBoard, ProjectDevice sowie Geschoss/Raum verwenden dabei
`project-command-transaction.persistence.ts` als gemeinsame äußere
Transaktionsgrenze. Sie führt Fachänderung, Revisions-Append und
History-Transition in fester Reihenfolge innerhalb derselben SQLite-Transaktion
aus; die fachlichen Validierungs- und Inversenregeln bleiben im jeweiligen
Store.
`circuit-device-row.insert` und `circuit-device-row.delete` sind atomare
Strukturkommandos. Beim Löschen wird die vollständige Zeile im inversen
Kommando gesichert, sodass Undo dieselbe UUID und alle Fachwerte wiederherstellt.
@@ -346,6 +346,9 @@ Implemented foundation:
- obsolete direct Circuit, CircuitDeviceRow, CircuitList, DistributionBoard and
Project repository writes are removed; integration fixtures live under
`tests/support` instead of production repositories
- structural Circuit, CircuitDeviceRow, DistributionBoard, ProjectDevice and
project-location stores share one tested transaction wrapper for domain
mutation, revision append and history transition
- the legacy consumer UI and application read/write endpoints are removed after verified data cutover
- retained legacy rows are accessible only through explicit database upgrade tooling
- project devices no longer persist duplicate legacy power, phase, cosPhi or remark fields