Skip to content

Data model

Built

This is the whole platform’s relational shape in one diagram: every table, its primary and foreign keys, and the references between them. It is generated from the live schema, not drawn by hand, so it cannot fall out of step with the tables. When a migration adds or changes a table, the next make gen redraws this page, and a schema change that forgets to regenerate is caught by the ERD drift test, the same way a stale generated client is.

The diagram groups tables into subsystem containers. Each table is a node showing only its primary-key and foreign-key columns, the relational skeleton, so a forty-plus-table platform stays legible; the full column list of any table lives in its migration and its Storage Gateway type, not here. Each edge is a foreign key, drawn from the referencing column to the row it points at. Edges that cross container borders are the seams between subsystems: estate.component.product_id pointing at catalog.product.id, or catalog.product_property.property_type_id pointing at telemetry.property_type.id.

The generator would render a table not yet assigned to a subsystem in an unclustered container, but a committed diagram never shows one: the introspection test hard-fails on any unmapped table, so the failure is the prompt to add a one-line entry for the new table to the cluster map in internal/erd/cluster.go (cmd/erdgen only calls it).

identityestatecatalogtelemetrycollectionconfigcontentauditcapabilityiduuidPKhumanprincipal_iduuidPKimpersonation_sessioniduuidPKreal_actor_principal_iduuidFKtarget_principal_iduuidFKprincipaliduuidPKprincipal_grantiduuidPKgroup_iduuidFKprincipal_iduuidFKrole_iduuidFKprincipal_groupiduuidPKprincipal_group_membergroup_iduuidPKprincipal_iduuidPKroleiduuidPKserviceprincipal_iduuidPKsystem_roleiduuidPKstandard_iduuidFKsystem_iduuidFKsystem_role_assignmentiduuidPKcomponent_iduuidFKrole_iduuidFKsystem_iduuidFKsystem_role_capabilityiduuidPKcapability_iduuidFKrole_iduuidFKcomponentiduuidPKlocation_iduuidFKparent_iduuidFKproduct_iduuidFKcomponent_capabilityiduuidPKcapability_iduuidFKcomponent_iduuidFKinterfaceiduuidPKcomponentuuidFKnode_nameuuidFKtypeuuidFKinterface_typeiduuidPKlocationiduuidPKlocation_typeuuidFKparent_iduuidFKlocation_typeiduuidPKlocation_type_propertyiduuidPKlocation_type_iduuidFKproperty_type_iduuidFKsystemiduuidPKlocation_iduuidFKparent_iduuidFKstandard_iduuidFKsystem_memberiduuidPKcomponent_iduuidFKsystem_iduuidFKdriveriduuidPKproductiduuidPKdriver_iduuidFKparent_product_iduuidFKvendor_iduuidFKproduct_capabilityiduuidPKcapability_iduuidFKproduct_iduuidFKproduct_propertyiduuidPKproduct_iduuidFKproperty_type_iduuidFKstandardiduuidPKparent_standard_iduuidFKstandard_propertyiduuidPKproperty_type_iduuidFKstandard_iduuidFKvendoriduuidPKalarmiduuidPKcomponent_iduuidFKalarm_capabilityiduuidPKalarm_iduuidFKcapability_iduuidFKcommandidbigintPKcaused_event_idbigintFKcommand_type_iduuidFKcomponent_iduuidFKlocation_iduuidFKnode_iduuidFKsystem_iduuidFKcommand_typeiduuidPKtarget_property_type_iduuidFKeventidbigintPKcomponent_iduuidFKevent_type_iduuidFKlocation_iduuidFKnode_iduuidFKsource_event_idbigintFKsource_log_line_idbigintFKsystem_iduuidFKevent_typeiduuidPKlog_lineidbigintPKcomponent_iduuidFKlocation_iduuidFKnode_iduuidFKsystem_iduuidFKmetricidbigintPKcomponent_iduuidFKevent_idbigintFKlocation_iduuidFKnode_iduuidFKproperty_type_iduuidFKsystem_iduuidFKpropertyiduuidPKcomponent_iduuidFKlocation_iduuidFKnode_iduuidFKproperty_type_iduuidFKsystem_iduuidFKproperty_typeiduuidPKstateidbigintPKcomponent_iduuidFKevent_idbigintFKlocation_iduuidFKnode_iduuidFKproperty_type_iduuidFKsystem_iduuidFKnodeprincipal_iduuidPKlocation_iduuidFKtaskidtextPKinterface_iduuidFKcredentialiduuidPKprincipal_iduuidFKplatform_settingkeytextPKsecretiduuidPKcomponent_iduuidFKlocation_iduuidFKsecret_typeuuidFKsystem_iduuidFKsecret_typeiduuidPKsetting_overrideiduuidPKvariableiduuidPKcomponent_iduuidFKlocation_iduuidFKsystem_iduuidFKblobsha256textPKfileiduuidPKsha256textFKtagiduuidPKtag_bindingiduuidPKcomponent_iduuidFKlocation_iduuidFKnode_iduuidFKsystem_iduuidFKtag_iduuidFKaudit_logiduuidPKactor_principal_iduuidFKreal_actor_principal_iduuidFK
  • identity - who can act and what they may do: principals (human and service), groups, grants, roles, capabilities, and the impersonation trail.
  • estate - what is being monitored: locations, systems, components, and the interfaces a component exposes.
  • catalog - the shared reference library: vendors, products, drivers, and standards, plus the capabilities and properties they define.
  • telemetry - the observability model of ADR-0063: the typed registries (property_type, event_type, command_type) over the bare-noun data tables (property, metric, state, event, log_line, command) and the alarms raised off them (alarm, alarm_capability).
  • collection - where and how telemetry is gathered: the nodes that run probes and the tasks they execute.
  • config - the settings, variables, secrets, and credentials that parameterize everything above.
  • content - the cross-cutting attachments: blobs, files, and the tag bindings that label any entity.
  • audit - the immutable record of every privileged mutation and auth event.