hr.training_course_attendance
Schema: hr
English table: hr.training_course_attendance
Italian original table: hr.corsi_presenze
Description: Attendance records for people in training course sessions.
Overview
- Columns: 9
- 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. |
tca_id | corp_id | integer | NO | | Business identifier of the attendance record (unique per tenant). |
tca_session_id | corp_cors_id | integer | NO | | Referenced training course session identifier. |
tca_person_id | corp_ana_id | integer | NO | | Referenced person identifier. |
tca_is_present | corp_presente | boolean | NO | | Whether the person was present in the session. |
tca_hours | corp_ora | integer | NO | | Hours credited/recorded for attendance (as stored in source). |
tenant_id | tenant_id | integer | YES | | Tenant identifier for row-level segregation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields in JSON format. |
_deleted | _deleted | boolean | YES | false | Technical soft-delete flag (true = logically hidden). |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_training_course_attendance_person | tca_person_id, tenant_id | hr.person_registry | pr_id, tenant_id | RESTRICT | CASCADE |
fk_training_course_attendance_session | tca_session_id, tenant_id | hr.training_course_sessions | tcs_id, tenant_id | RESTRICT | RESTRICT |
fk_training_course_attendance_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_training_course_attendance → id
- Unique:
uk_training_course_attendance_tca_id → tca_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_tca_tenant | NO | btree | tenant_id |
idx_tca_tenant_person | NO | btree | tenant_id, tca_person_id) WHERE (_deleted = false |
idx_tca_tenant_session | NO | btree | tenant_id, tca_session_id) WHERE (_deleted = false |
idx_tca_tenant_tca_id | NO | btree | tenant_id, tca_id) WHERE (_deleted = false |
Navigation