Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('court_case_id_seq'::regclass) |
|
|
||||||||||||||
| 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 |
|
|
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 |
|
|
||||||||||||||
| 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 |