court_case

-1 rows


Description

Description: Holds each instance of a court case. NOMIS Equivalent Entity: offender_cases Domain: Person Court Schedules

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 nextval('court_case_id_seq'::regclass)
charge.merged_from_case_id charge_merged_from_case_id_fkey R
court_appearance.court_case_id court_appearance_court_case_id_fkey R
court_case.merged_to_case_id fk_merged_to_case_id R
court_case_history.original_court_case_id court_case_history_original_court_case_id_fkey R
prisoner_id varchar 2147483647 null

Description: The id of the prisoner related to the court_case. Source System: NOMIS

case_unique_identifier varchar 2147483647 null

Description: The id related to the court case. Source System: Remand & Sentencing

latest_court_appearance_id int4 10 null
court_appearance.id latest_court_appearance_fk R

Description: The id related to the latest court appearance in the court case. Source System: Remand & Sentencing

created_at timestamptz 35,6 null

Description: The timestamp of when the court case record was created. Source System: Remand & Sentencing

created_by varchar 2147483647 null
legacy_data jsonb 2147483647 null

Description: Legacy sentence type JSON to hold the court case details that are not supported within RaS. This is used for the bidirectional sync between NOMIS and DPS. Source System: Remand & Sentencing

created_prison varchar 2147483647 null
merged_to_case_id int4 10 null
court_case.id fk_merged_to_case_id R
merged_to_date date 13 null
updated_at timestamptz 35,6 null
updated_by varchar 2147483647 null
status_id varchar 2147483647 null

Description: The id of the status of the court case. Source System: Remand & Sentencing

Indexes

Constraint Name Type Sort Column(s)
court_case_pkey Primary key Asc id
idx_court_case_booking_id Performance
idx_court_case_case_unique_identifier Must be unique Asc case_unique_identifier
idx_court_case_latest_court_appearance Performance Asc latest_court_appearance_id
idx_court_case_merged_to_case_id Performance Asc merged_to_case_id
idx_court_case_prisoner_id Performance Asc prisoner_id
idx_court_case_status_id Performance Asc status_id

Relationships