Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('court_appearance_id_seq'::regclass) |
|
|
||||||||||||||||||||
| appearance_outcome_id | int4 | 10 | √ | null |
|
|
Description: The id related to the outcome of the court appearance. Source System: Remand & Sentencing |
|||||||||||||||||||
| court_case_id | int4 | 10 | null |
|
|
Description: The id related to the court case. Source System: Remand & Sentencing |
||||||||||||||||||||
| court_code | varchar | 2147483647 | null |
|
|
Description: The code of the court where the appearance is taking place. These codes are held in Court Register. Source System: Court Register |
||||||||||||||||||||
| court_case_reference | varchar | 2147483647 | √ | null |
|
|
Description: The refrerence number assigned to the court case. Source System: Common Platform, Libra, Xhibit |
|||||||||||||||||||
| appearance_date | date | 13 | null |
|
|
Description: The date of the court appearance. Source System: Remand & Sentencing |
||||||||||||||||||||
| next_court_appearance_id | int4 | 10 | √ | null |
|
|
Description: The id related to the next court appearance. Source System: Remand & Sentencing |
|||||||||||||||||||
| created_at | timestamptz | 35,6 | null |
|
|
Description: The timestamp of when the court appearance record was created. Source System: Remand & Sentencing |
||||||||||||||||||||
| created_by | varchar | 2147483647 | null |
|
|
|||||||||||||||||||||
| created_prison | varchar | 2147483647 | √ | null |
|
|
Description: The prison where the record was initially created, this is used when offenders are transferred around to different prisons. Source System: Remand & Sentencing |
|||||||||||||||||||
| warrant_type | varchar | 2147483647 | 'REMAND'::character varying |
|
|
Description: The type of the warrant for the court case appearance. Source System: Remand & Sentencing |
||||||||||||||||||||
| overall_conviction_date | date | 13 | √ | null |
|
|
Description: The date an offender was declared guilty of a charge offence. Used when there are multiple sentences related to a court appearance. Source System: Remand & Sentencing |
|||||||||||||||||||
| appearance_uuid | uuid | 2147483647 | gen_random_uuid() |
|
|
Description: The unique id related to the court appearance. The appearance may get amended so the appearance uuid can change over time. Source System: Remand & Sentencing |
||||||||||||||||||||
| legacy_data | jsonb | 2147483647 | √ | null |
|
|
Description: Legacy JSON to hold details for court appearance details that are not supported within RaS. This is used for the bidirectional sync between NOMIS and DPS. Source System: Remand & Sentencing |
|||||||||||||||||||
| updated_at | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||
| updated_by | varchar | 2147483647 | √ | null |
|
|
||||||||||||||||||||
| updated_prison | varchar | 2147483647 | √ | null |
|
|
||||||||||||||||||||
| source | varchar | 2147483647 | 'NOMIS'::character varying |
|
|
|||||||||||||||||||||
| status_id | varchar | 2147483647 | √ | null |
|
|
Description: The id of the status of the court appearance. Source System: Remand & Sentencing |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| court_appearance_pkey | Primary key | Asc | id |
| idx_court_appearance_appearance_date_asc | Performance | Asc | appearance_date |
| idx_court_appearance_appearance_date_desc | Performance | Desc | appearance_date |
| idx_court_appearance_court_case_id | Performance | Asc | court_case_id |
| idx_court_appearance_legacy_data_nomis_outcome_code | Performance | ||
| idx_court_appearance_lifetime | Performance | Asc | appearance_uuid |
| idx_court_appearance_status_id | Performance | Asc | status_id |
| idx_court_appearance_status_id_date | Performance | Asc/Asc | appearance_date + status_id |
| idx_sentence_legacy_data_type | Performance |