hr.user_profiles
Schema: hr
English table: hr.user_profiles
Italian original table: hr.utenti_profili
Description: Definition of permission templates and visibility scopes for user accounts.
Overview
- Columns: 14
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 1
- Indexes: 5
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | `` | integer | NO | Surrogate primary key. | |
upr_id | utprof_id | integer | NO | Identifier of the related upr record. | |
upr_user_type_id | utprof_tut_id | integer | NO | Identifier of the related upr user type record. | |
upr_description | utprof_description | character varying(50) | NO | Description text. | |
upr_companies_scope | utprof_az_id | character varying(100) | NO | Text value. | |
upr_areas_scope | utprof_aree | character varying(100) | NO | Text value. | |
upr_groups_scope | utprof_gruppi | character varying(100) | NO | Text value. | |
upr_data_scope | utprof_dati | text | NO | Text value. | |
upr_applications_scope | utprof_appl | text | NO | Text value. | |
upr_work_sites_scope | utprof_sede_id | character varying(100) | NO | Text value. | |
upr_employee_summary_config | utprof_riepilogoDip | character varying(250) | NO | Configuration for employee summary views/dashboards for this profile. | |
tenant_id | `` | integer | YES | Tenant identifier for data isolation. | |
colcustom | `` | jsonb | YES | '{}'::jsonb | JSON payload containing additional attributes. |
_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_upr_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_upr_user_type | upr_user_type_id, tenant_id | hr.x_user_types | xut_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|---|---|---|
hr.users | fk_users_profile | usr_profile_id, tenant_id | upr_id, tenant_id |
Constraints
- Primary key:
pk_user_profiles→id - Unique:
uk_upr_id_tenant→upr_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_upr_companies_tenant | NO | btree | tenant_id, upr_companies_scope) WHERE (_deleted = false |
idx_upr_id_tenant | NO | btree | tenant_id, upr_id) WHERE (_deleted = false |
idx_upr_tenant | NO | btree | tenant_id |
idx_upr_user_type_tenant | NO | btree | tenant_id, upr_user_type_id) WHERE (_deleted = false |
idx_upr_work_sites_tenant | NO | btree | tenant_id, upr_work_sites_scope) WHERE (_deleted = false |