Skip to main content
PeopleWorkspaceConnector is a direction-discriminated junction table that records per-row provenance between a People record and a WorkspaceConnector instance. Each row answers the question “which connector sourced or consumed this person, and in which direction?” — input for connectors that delivered the record into Well, output for connectors that received it from Well. Tenant isolation is inherited transitively through the People.workspace and WorkspaceConnector.workspace relationships; there is no direct workspace_pk column on the junction itself. The table was introduced in Migration20260505200000 as part of a five-entity junction pattern (W19 PR-A1), following the document_workspace_connectors precedent.
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

Data model

Attributes

Relationships

System-computed

  • pk — auto-increment serial primary key, internal only; never exposed on the public API
  • created_at — set to new Date() on INSERT via MikroORM onCreate: () => new Date() hook; PG column default is now()
  • updated_at — set on INSERT and updated on every subsequent mutation via MikroORM onCreate / onUpdate hooks
  • deleted_at — soft-delete sentinel; injected as NULL on INSERT; set by the connector sync orchestrator when a provenance link is invalidated or the connector is disconnected
  • Tenant isolation is not a stored column on this table — it is derived transitively through people.workspace_pk and workspace_connector.workspace_pk; Hasura RLS uses relationship traversal rather than a direct workspace_pk filter
  • No UNIQUE constraint on (people_pk, workspace_connector_pk, direction) — duplicate rows are an accepted design gap per the W19 migration rationale; deduplication is deferred to a future iteration
  • Two composite B-tree indexes: idx_people_workspace_connectors_record_created on (people_pk, created_at) for record-led traversals; idx_people_workspace_connectors_wc_created_at on (workspace_connector_pk, created_at) for sync-status range queries

Example

Source: /Users/maximechampoux/platform/apps/api/src/database/entities/PeopleWorkspaceConnector.ts · domain: ingestion · tier: Infrastructure