authorisation

-1 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 null
version int4 10 null
person_identifier varchar 10 null
person_summary.person_identifier fk_authorisation_person R
prison_code varchar 6 null
status_id uuid 2147483647 null
authorisation_status.id fk_tap_authorisation_status R
absence_type_id uuid 2147483647 null
absence_type.id fk_tap_authorisation_absence_type R
absence_sub_type_id uuid 2147483647 null
absence_sub_type.id fk_tap_authorisation_absence_sub_type R
absence_reason_category_id uuid 2147483647 null
absence_reason_category.id fk_tap_authorisation_absence_reason_category R
absence_reason_id uuid 2147483647 null
absence_reason.id fk_tap_authorisation_absence_reason R
accompanied_by_id uuid 2147483647 null
accompanied_by.id fk_tap_authorisation_accompanied_by R
transport_id uuid 2147483647 null
transport.id fk_tap_authorisation_transport R
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

Relationships