hr.customer_project_activity_custom_fields
Schema: hr
English table: hr.customer_project_activity_custom_fields
Italian original table: hr.in_commesse_attivita_fieldcustom
Description: Links between activities and their specific custom field definitions.
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Technical primary key (surrogate). |
caf_id | comatf_id | integer | NO | | Functional identifier for the activity custom field link. |
caf_activity_id | comatf_comat_id | integer | NO | | Reference to the project activity (cpa_id). |
caf_custom_field_id | comatf_cfield_id | integer | NO | | Reference to the custom field definition. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON structure for custom fields metadata. |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_cust_proj_act_custom_fields_activity_id | caf_activity_id, tenant_id | hr.customer_project_activities | cpa_id, tenant_id | RESTRICT | RESTRICT |
fk_cust_proj_act_custom_fields_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_customer_project_activity_custom_fields → id
- Unique:
uk_customer_project_activity_custom_fields_caf_id → caf_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_caf_activity_id_tenant | NO | btree | tenant_id, caf_activity_id) WHERE (_deleted = false |
idx_caf_custom_field_id_tenant | NO | btree | tenant_id, caf_custom_field_id) WHERE (_deleted = false |
idx_caf_id_tenant | NO | btree | tenant_id, caf_id) WHERE (_deleted = false |
idx_caf_tenant | NO | btree | tenant_id |
Navigation