Skip to content

Database Schema Reference ​

Every schema and table the platform creates in PostgreSQL, on one page: which center owns which block, and what each table holds. The database is built once by the initdb scripts (see Version Upgrades and Database Migrations); structural change goes through migrations only — so this page doubles as the map to consult before touching the database.

You are here: writing cross-table queries, deciding backup scope, or tracing "which table does this land in". The DDL in the upstream dc3/dependencies/postgres/initdb/ is the source of truth.

One-page overview ​

Schemainitdb scriptOwnerHolds
dc3_auth02-iot-dc3-auth.sqlAuth centertenants, identities, RBAC, OAuth, MCP connections & audit
dc3_data03-iot-dc3-data.sqlData centerrules, alarms, notifications, messages, execution histories
dc3_manager04-iot-dc3-manager.sqlManager centerdrivers, devices, profiles, points, commands, events — all metadata
dc3_history05-iot-dc3-history.sqlData centerpoint-value hypertable and latest-value projection
dc3_agentic06-iot-dc3-agentic.sqlAgentic centersessions, messages, attachments, actions, model config
public (runtime)08-iot-dc3-runtime.sqlsharedfingerprint, async operations, outbox, idempotency, locks

dc3_auth: identity and permissions ​

TableHolds
dc3_tenanttenants
dc3_principalunified principal (users / service accounts / system identities share it)
dc3_user / dc3_local_credentialusers, local password credentials
dc3_tenant_membership / dc3_service_accounttenant membership, service accounts
dc3_identity_provider / dc3_external_identityexternal identity sources and their mappings
dc3_role / dc3_resourceroles and permission resources (seeded permission codes land here)
dc3_role_principal_bind / dc3_role_resource_bindrole-principal and role-resource bindings
dc3_driver_token / dc3_apidriver registration tokens, API records
dc3_oauth_registered_client / dc3_oauth_authorization / dc3_oauth_authorization_consentOAuth client registration, authorizations, consent
dc3_mcp_connection / dc3_mcp_tool_catalog / dc3_mcp_connection_toolMCP connections, tool catalog, per-connection tool whitelists
dc3_mcp_audit_log / dc3_mcp_tool_confirmationMCP call audit, high-risk tool confirmation tickets
dc3_menu / dc3_identity_audit_logconsole menus, identity audit

dc3_manager: metadata ​

TableHolds
dc3_label / dc3_label_bind / dc3_group / dc3_group_bindlabels and groups plus their bindings
dc3_driver / dc3_driver_instance / dc3_driver_lease_statedriver definitions, leased runtime replicas, lease state
dc3_device_leasesingle-owner device assignments with monotonic fencing tokens
dc3_driver_device_revisionO(1) change detection for driver-device assignments
dc3_driver_attribute / dc3_point_attribute / dc3_command_attribute / dc3_event_attributeattribute definitions for the four entity kinds
dc3_profile / dc3_point / dc3_deviceprofiles, points, devices
dc3_driver_attribute_config / dc3_point_attribute_config / dc3_command_attribute_config / dc3_event_attribute_configattribute values configured on entities
dc3_command / dc3_command_paramcommands and their params
dc3_event / dc3_event_paramevents and their params

dc3_data: rules and runtime data ​

TableHolds
dc3_rule / dc3_rule_statealarm rules and the rule state machine
dc3_entity_alarmentity alarms ("what is firing now")
dc3_entity_stateentity state leases
dc3_notify / dc3_notify_channel / dc3_notify_channel_bind / dc3_notify_historynotifications, channels, bindings, history
dc3_messageplatform messages
dc3_point_command_history / dc3_command_history / dc3_event_historypoint-command, command-execution, and event-report histories

dc3_history: point-value time series ​

TableHolds
dc3_point_valuepoint history hypertable (TimescaleDB: 1-day chunks + 16 device hash buckets; 30-day raw retention)
dc3_point_latestlatest-value projection shared by all Data Center replicas
cagg_point_value_1m / cagg_point_value_1hcontinuous aggregates: 1-minute for 1 year, 1-hour forever

Retention policy and query paths are covered in Data Plane.

dc3_agentic: AI conversations ​

TableHolds
dc3_session / dc3_messagesession metadata and persisted messages
dc3_attachmentattachments
dc3_actionpending and executed high-risk actions
dc3_model_provider / dc3_model_configmodel providers (API keys encrypted at rest) and model configs

See Agentic Center.

public and the runtime tables ​

Support tables created by 08-iot-dc3-runtime.sql, shared across centers:

TableHolds
dc3_schema_fingerprintthe initdb DDL fingerprint the startup gate compares against
dc3_operationasync operation state (where 202 endpoints like device import land)
dc3_outboxtransactional outbox
dc3_idempotencytenant-scoped idempotency keys and results
dc3_platform_lockrow locks with fencing tokens
dc3_point_value_ingest_outboxpoint-value ingest receipts and replay state
dc3_manager.dc3_device_import_jobXLSX device-import job payloads (lives in the manager schema)

Further reading ​

Released under the AGPL-3.0 License