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 |
|
|
||||||
| 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 |
|
|
||||||
| repeat | bool | 1 | null |
|
|
||||||
| comments | text | 2147483647 | √ | null |
|
|
|||||
| start | date | 13 | null |
|
|
||||||
| end | date | 13 | null |
|
|
||||||
| reason_path | jsonb | 2147483647 | null |
|
|
||||||
| schedule | jsonb | 2147483647 | √ | null |
|
|
|||||
| legacy_id | int8 | 19 | √ | null |
|
|
|||||
| locations | jsonb | 2147483647 | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_tap_authorisation | Primary key | Asc | id |
| idx_tap_authorisation_prison_person_start_end | Performance | Asc/Asc/Asc/Asc | prison_code + person_identifier + start + end |
| idx_tap_authorisation_status_end | Performance | Asc/Asc | status_id + end |
| idx_tap_authorisation_status_end_prison | Performance | Asc/Asc/Asc | status_id + end + prison_code |
| uq_tap_authorisation_legacy_id | Must be unique | Asc | legacy_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| authorisation_status_id_not_null1 | status_id IS NOT NULL |