Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | null |
|
|
||||||
| version | int4 | 10 | null |
|
|
||||||
| person_identifier | varchar | 10 | null |
|
|
||||||
| prison_code | varchar | 6 | null |
|
|
||||||
| uuid | 2147483647 | null |
|
|
|||||||
| status_id | uuid | 2147483647 | null |
|
|
||||||
| absence_type_id | uuid | 2147483647 | √ | null |
|
|
|||||
| absence_sub_type_id | uuid | 2147483647 | √ | null |
|
|
|||||
| absence_reason_category_id | uuid | 2147483647 | √ | null |
|
|
|||||
| absence_reason_id | uuid | 2147483647 | null |
|
|
||||||
| accompanied_by_id | uuid | 2147483647 | null |
|
|
||||||
| transport_id | uuid | 2147483647 | null |
|
|
||||||
| start | timestamp | 29,6 | null |
|
|
||||||
| end | timestamp | 29,6 | null |
|
|
||||||
| location | jsonb | 2147483647 | null |
|
|
||||||
| contact_information | text | 2147483647 | √ | null |
|
|
|||||
| comments | text | 2147483647 | √ | null |
|
|
|||||
| reason_path | jsonb | 2147483647 | null |
|
|
||||||
| legacy_id | int8 | 19 | √ | null |
|
|
|||||
| dps_only | bool | 1 | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_tap_occurrence | Primary key | Asc | id |
| idx_tap_occurrence_authorisation_id | Performance | Asc | authorisation_id |
| idx_tap_occurrence_person_identifier_dps_only | Performance | Asc/Asc | person_identifier + dps_only |
| idx_tap_occurrence_prison_end | Performance | Asc/Asc | prison_code + end |
| idx_tap_occurrence_prison_person_start_end | Performance | Asc/Asc/Asc/Asc | prison_code + person_identifier + start + end |
| idx_tap_occurrence_prison_start_end | Performance | Asc/Asc/Asc | prison_code + start + end |
| idx_tap_occurrence_status_id_end | Performance | Asc/Asc | status_id + end |
| uq_tap_occurrence_legacy_id | Must be unique | Asc | legacy_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| occurrence_status_id_not_null1 | status_id IS NOT NULL |