hr.organization_unit_groups
Schema: hr
English table: hr.organization_unit_groups
Italian original table: hr.organigramma_gruppi
Description: Association between organization units and element groups, with optional propagation to child units.
Overview
- Columns: 8
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
oug_id | orgag_id | integer | NO | | Logical identifier of the association (unique per tenant). |
oug_organization_unit_id | orgag_org_id | integer | NO | | Reference to the organization unit. |
oug_group_id | orgag_grp_id | integer | NO | | Reference to the element group. |
oug_extend_to_children | orgag_estendi_figli | boolean | NO | | If true, the association is propagated to child organization units. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON payload containing additional attributes. |
_deleted | _deleted | boolean | YES | false | Flag indicating whether the record is soft-deleted. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_oug_group | oug_group_id, tenant_id | hr.element_groups | eg_id, tenant_id | RESTRICT | RESTRICT |
fk_oug_organization_unit | oug_organization_unit_id, tenant_id | hr.organization_units | ou_id, tenant_id | RESTRICT | RESTRICT |
fk_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
organization_unit_groups_pkey → id
- Unique:
uk_oug_id_tenant → oug_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_organization_unit_groups_oug_group_id_tenant | NO | btree | tenant_id, oug_group_id) WHERE (_deleted = false |
idx_organization_unit_groups_oug_id_tenant | NO | btree | tenant_id, oug_id) WHERE (_deleted = false |
idx_organization_unit_groups_oug_organization_unit_id_tenant | NO | btree | tenant_id, oug_organization_unit_id) WHERE (_deleted = false |
idx_organization_unit_groups_tenant | NO | btree | tenant_id |
Navigation