Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||
| practice_id | text | 2147483647 | null |
|
|
||||||
| location_id | text | 2147483647 | √ | null |
|
|
|||||
| source_system | text | 2147483647 | null |
|
|
||||||
| source_type | text | 2147483647 | null |
|
|
||||||
| source_entity_id | text | 2147483647 | null |
|
|
||||||
| source_entity_version | text | 2147483647 | √ | null |
|
|
|||||
| title | text | 2147483647 | null |
|
|
||||||
| preview | text | 2147483647 | √ | null |
|
|
|||||
| body | text | 2147483647 | √ | null |
|
|
|||||
| priority | text | 2147483647 | 'normal'::text |
|
|
||||||
| target | jsonb | 2147483647 | '{}'::jsonb |
|
|
||||||
| metadata | jsonb | 2147483647 | '{}'::jsonb |
|
|
||||||
| occurred_at | timestamptz | 35,6 | now() |
|
|
||||||
| created_at | timestamptz | 35,6 | now() |
|
|
||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| notifications_pkey | Primary key | Asc | id |
| notifications_practice_id_source_system_source_type_source__key | Must be unique | Asc/Asc/Asc/Asc | practice_id + source_system + source_type + source_entity_id |
| notifications_practice_location_idx | Performance | Asc/Asc/Desc | practice_id + location_id + occurred_at |
| notifications_practice_occurred_idx | Performance | Asc/Desc | practice_id + occurred_at |
| notifications_source_idx | Performance | Asc/Asc/Asc | source_system + source_type + source_entity_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| notifications_source_type_check | ((source_type = ANY (ARRAY['patient_message'::text, 'lead_message'::text, 'form_submission'::text, 'alert'::text]))) |
| notifications_priority_check | ((priority = ANY (ARRAY['low'::text, 'normal'::text, 'high'::text, 'urgent'::text]))) |
| notifications_source_system_check | ((source_system = ANY (ARRAY['legacy_hpt'::text, 'revique'::text]))) |


