hr.customer_project_activities
Schema: hr
English table: hr.customer_project_activities
Italian original table: hr.in_commesse_attivita
Description: Specific activities defined within a customer project or sub-link.
Overview
- Columns: 10
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 2
- Indexes: 5
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Technical primary key (surrogate). | |
cpa_id | comat_id | integer | NO | Functional identifier for the project activity. | |
cpa_cpr_id | comat_com_id | integer | YES | Reference to the parent customer project (cpr_id). | |
cpa_code | comat_code | character varying(50) | NO | Unique code for the activity. | |
cpa_description | comat_description | character varying(250) | NO | Full description of the activity. | |
cpa_is_enabled | comat_enabled | boolean | NO | Flag indicating if the activity is active. | |
cpa_cpl_id | comat_coml_id | integer | YES | Reference to the specific project link (cpl_id). | |
tenant_id | tenant_id | integer | YES | Tenant identifier for data isolation. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON structure for custom fields. |
_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_project_activities_cpl_id | cpa_cpl_id, tenant_id | hr.customer_project_links | cpl_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_project_activities_cpr_id | cpa_cpr_id, tenant_id | hr.customer_projects | cpr_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_project_activities_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|---|---|---|
hr.customer_project_activity_custom_fields | fk_cust_proj_act_custom_fields_activity_id | caf_activity_id, tenant_id | cpa_id, tenant_id |
hr.customer_project_activity_groups | fk_cust_proj_act_groups_activity_id | pag_activity_id, tenant_id | cpa_id, tenant_id |
Constraints
- Primary key:
pk_customer_project_activities→id - Unique:
uk_customer_project_activities_cpa_id→cpa_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_cpa_cpl_id_tenant | NO | btree | tenant_id, cpa_cpl_id) WHERE (_deleted = false |
idx_cpa_cpr_cpl_id_tenant | NO | btree | tenant_id, cpa_cpr_id, cpa_cpl_id) WHERE (_deleted = false |
idx_cpa_cpr_id_tenant | NO | btree | tenant_id, cpa_cpr_id) WHERE (_deleted = false |
idx_cpa_id_tenant | NO | btree | tenant_id, cpa_id) WHERE (_deleted = false |
idx_cpa_tenant | NO | btree | tenant_id |
Navigation
- Back to main index
- [Back to
hrindex]../)