Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('charge_id_seq'::regclass) |
|
|
||||||||||||||
| charge_uuid | uuid | 2147483647 | null |
|
|
Description: The id related to the charge. The charge may get amended so the charge uuid can change over time. Source System: Remand & Sentencing |
||||||||||||||
| offence_code | varchar | 2147483647 | null |
|
|
Description: A code to represent an offence where the offence is used in the generic sense covering the reasons for bringing a court case against a defendant. Source System: Manage Offences System |
||||||||||||||
| offence_start_date | date | 13 | √ | null |
|
|
Description: The date of when the offence started. Source System: Remand & Sentencing |
|||||||||||||
| offence_end_date | date | 13 | √ | null |
|
|
Description: The date of when the offence ended. Source System: Remand & Sentencing |
|||||||||||||
| charge_outcome_id | int4 | 10 | √ | null |
|
|
Description: The id of the outcome of the charge. Source System: Remand & Sentencing |
|||||||||||||
| superseding_charge_id | int4 | 10 | √ | null |
|
|
Description: The id related to the charge record which is replacing a historic charge record. This is used for auditing purposes. Source System: Remand & Sentencing |
|||||||||||||
| bool | 1 | √ | null |
|
|
Description: A flag to determine whether the charge is terror related or not. This impacts release date calculation. Source System: Remand & Sentencing |
||||||||||||||
| created_at | timestamptz | 35,6 | now() |
|
|
Description: Auto created timestamp of when the charge record was created. Source System: Remand & Sentencing |
||||||||||||||
| legacy_data | jsonb | 2147483647 | √ | null |
|
|
Description: Legacy JSON to hold details for charges that are not supported within RaS. This is used for the bidirectional sync between NOMIS and DPS. Source System: Remand & Sentencing |
|||||||||||||
| created_by | varchar | 2147483647 | 'UNRECORDED'::character varying |
|
|
|||||||||||||||
| merged_from_case_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| created_prison | varchar | 2147483647 | √ | null |
|
|
||||||||||||||
| updated_at | timestamptz | 35,6 | null |
|
|
|||||||||||||||
| updated_by | varchar | 2147483647 | √ | null |
|
|
||||||||||||||
| updated_prison | varchar | 2147483647 | √ | null |
|
|
||||||||||||||
| merged_from_date | date | 13 | √ | null |
|
|
||||||||||||||
| status_id | varchar | 2147483647 | √ | null |
|
|
Description: The id of the status of the charge. Source System: Remand & Sentencing |
|||||||||||||
| bool | 1 | √ | null |
|
|
|||||||||||||||
| bool | 1 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| charge_pkey | Primary key | Asc | id |
| idx_charge_legacy_data_nomis_outcome_code | Performance | ||
| idx_charge_lifetime | Performance | Asc | charge_uuid |
| idx_charge_merged_from_case_id | Performance | Asc | merged_from_case_id |
| idx_charge_status_id | Performance | Asc | status_id |
| idx_charge_superseding_charge_id | Performance | Asc | superseding_charge_id |