Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('period_length_id_seq'::regclass) |
|
|
|||||
| years | int4 | 10 | √ | null |
|
|
Description: The number of years of the sentence. Source System: Remand & Sentencing |
||||
| months | int4 | 10 | √ | null |
|
|
Description: The number of months of the sentence. Source System: Remand & Sentencing |
||||
| weeks | int4 | 10 | √ | null |
|
|
Description: The number of weeks of the sentence. Source System: Remand & Sentencing |
||||
| days | int4 | 10 | √ | null |
|
|
Description: The number of days of the sentence. Source System: Remand & Sentencing |
||||
| period_order | varchar | 2147483647 | √ | null |
|
|
Description: The order of the units that make up a period, eg years, months, weeks, days. Note that the length of a term 1 month and 1 year, for example, may be different to a term of 1 year and 1 month. Source System: Remand & Sentencing |
||||
| period_length_type | varchar | 2147483647 | √ | null |
|
|
Description: The nature of the period entered. Source System: Remand & Sentencing |
||||
| sentence_id | int4 | 10 | √ | null |
|
|
Description: The id of the sentence which the period length is related to. Source System: Remand & Sentencing |
||||
| appearance_id | int4 | 10 | √ | null |
|
|
Description: The id of the specific court appearance the period length relates to, in order to record an overall sentence period. Also, used to validate the period of it’s constituent sentences. Source System: Remand & Sentencing |
||||
| legacy_data | jsonb | 2147483647 | √ | null |
|
|
Description: Legacy JSON to hold details for sentences period length types that are not supported within RaS. This is used for the bidirectional sync between NOMIS and DPS. Source System: Remand & Sentencing |
||||
| period_length_uuid | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||
| created_at | timestamptz | 35,6 | now() |
|
|
||||||
| created_by | varchar | 2147483647 | 'UNKNOWN'::character varying |
|
|
||||||
| created_prison | varchar | 2147483647 | √ | null |
|
|
|||||
| updated_at | timestamptz | 35,6 | √ | null |
|
|
|||||
| updated_by | varchar | 2147483647 | √ | null |
|
|
|||||
| updated_prison | varchar | 2147483647 | √ | null |
|
|
|||||
| status_id | varchar | 2147483647 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| period_length_pkey | Primary key | Asc | id |
| idx_period_length_appearance_id | Performance | Asc | appearance_id |
| idx_period_length_sentence_id | Performance | Asc | sentence_id |
| idx_period_length_uuid | Performance | Asc | period_length_uuid |