Database schema was updated to use engineering_objects as the unified object store for equipment-like entities (tank, vessel, pump, etc.) and calculator-linked objects. As of 2026-03-13, saved app calculations also use a shared hybrid persistence model built around calculations and calculation_versions.
- Remove fragmentation across many equipment-specific tables.
- Align with object-based central i-DDC integration.
- Keep one canonical object identity (
engineering_objects.uuid) for cross-app linking.
- Expanded
engineering_objectswith operational equipment fields (area_id,owner_id,name,design_*,mawp_*,is_active,deleted_at, etc.). - Backfilled rows from
equipmentintoengineering_objects. - Switched foreign keys:
equipment_links.equipment_id->engineering_objects.uuidventing_calculations.equipment_id->engineering_objects.uuid
- Kept
/equipmentAPI contract for compatibility while persisting viaengineering_objects. - Made
properties.design_parametersthe canonical location for design pressure/temperature fields (migration phase 1). - Added shared saved-calculation persistence with:
calculationsfor the current snapshotcalculation_versionsfor immutable audit and restore history- venting compatibility wrappers backed by the shared calculation store
202603060001_create_engineering_objects_table.py202603060002_unify_equipment_into_engineering_objects.py202603060003_move_design_params_to_properties.py202603060004_drop_engineering_object_design_columns.py
/equipmentroot has been removed from the documented and runtime API surface.- The compatibility path is
/legacy/equipment. - Equipment payload shape remains compatible:
id,type,tag,name,details, etc. - Design parameters are stored in
properties.design_parametersas canonical source. - Transitional design columns were removed in phase 2.
- Soft delete uses
is_active+deleted_atinengineering_objects. - JSONB payload reference by object class:
docs/ENGINEERING_OBJECT_PROPERTIES_REFERENCE.md
equipmenttable still exists during transition for backward compatibility.- New development should treat
engineering_objectsas source of truth. - New save/load work should treat
calculationspluscalculation_versionsas the source of truth for persisted calculator state. - Shared client guidance:
- prefer
apiClient.engineeringObjects - prefer
apiClient.calculationsfor saved calculator state createApiClient()no longer exposesapiClient.equipment- the legacy shared client wrapper for
/equipmenthas been removed - use raw
/equipmentroutes only for legacy compatibility or external transition work
- prefer
- For legacy venting integrations,
/ventingremains available but now maps into the shared calculations store. - Future cleanup phase can remove legacy equipment table dependencies after all modules are migrated.
GET /legacy/equipment?type=tankreturns expected rows.GET /legacy/equipment?type=vesselreturns expected rows.POST /ventingacceptsequipmentIdfrom engineering object UUID.GET /venting?equipmentId=<uuid>filters correctly.POST /equipment-linkscreates links using engineering object UUID.