hr.customer_location_group_assignments
Schema: hr
English table: hr.customer_location_group_assignments
Italian original table: hr.in_clienti_sedi_gruppi
Description: Link table between customer locations and element groups for categorization.
Overview
- Columns: 7
- 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 | | Internal surrogate primary key. |
clga_id | incliseg_id | integer | NO | | Unique identifier for the location assignment within a tenant. |
clga_customer_location_id | incliseg_inclise_id | integer | NO | | Reference to the customer location (customer_locations). |
clga_group_id | incliseg_grp_id | integer | NO | | Reference to the element group. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON field for custom data. |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_customer_location_group_assignments_group | clga_group_id, tenant_id | hr.element_groups | eg_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_location_group_assignments_location | clga_customer_location_id, tenant_id | hr.in_clienti_sedi | inclise_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_location_group_assignments_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_customer_location_group_assignments → id
- Unique:
uk_customer_location_group_assignments_id → clga_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_clga_group_tenant | NO | btree | tenant_id, clga_group_id) WHERE (_deleted = false |
idx_clga_id_tenant | NO | btree | tenant_id, clga_id) WHERE (_deleted = false |
idx_clga_location_tenant | NO | btree | tenant_id, clga_customer_location_id) WHERE (_deleted = false |
idx_clga_tenant | NO | btree | tenant_id |
Navigation