Skip to main content

hr.organization_unit_links

Schema: hr
English table: hr.organization_unit_links
Italian original table: hr.organigramma_link
Description: Links employment relationships to organization units with a validity period (multi-tenant).

Overview

  • Columns: 10
  • Primary key: id
  • Outgoing foreign keys: 1
  • Incoming foreign keys: 0
  • Indexes: 7

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
oul_codeorgli_idintegerNOBusiness identifier for the organization unit link (unique per tenant).
oul_employment_relationship_idorgli_rap_idintegerNOEmployment relationship identifier associated with the organization unit assignment.
oul_organization_unit_idorgli_org_idintegerNOOrganization unit identifier.
oul_valid_fromorgli_dalla_datadateNOStart date (inclusive) of the assignment validity.
oul_valid_toorgli_alla_datadateNOEnd date (inclusive) of the assignment validity.
tenant_idtenant_idintegerYESTenant identifier.
colcustomcolcustomjsonbYES'{}'::jsonbCustom fields stored as JSON.
_deleted_deletedbooleanYESfalseSoft delete flag (technical).
oul_valid_periodorgli_periododaterangeYESGENERATED: daterange(oul_valid_from, oul_valid_to, '[]'::text)Generated validity period as a daterange derived from valid_from and valid_to (inclusive).

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_oul_tenant_idtenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_organization_unit_linksid
  • Unique: uk_oul_code_tenantoul_code, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_oul_tenantNObtreetenant_id
idx_oul_tenant_codeNObtreetenant_id, oul_code) WHERE (_deleted = false
idx_oul_tenant_emprNObtreetenant_id, oul_employment_relationship_id) WHERE (_deleted = false
idx_oul_tenant_empr_period_gistNOgisttenant_id, oul_employment_relationship_id, oul_valid_period) WHERE (_deleted = false
idx_oul_tenant_period_gistNOgisttenant_id, oul_valid_period) WHERE (_deleted = false
idx_oul_tenant_unitNObtreetenant_id, oul_organization_unit_id) WHERE (_deleted = false
idx_oul_tenant_unit_period_gistNOgisttenant_id, oul_organization_unit_id, oul_valid_period) WHERE (_deleted = false