Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| case_id | uuid | 2147483647 | null |
|
|
|||||||||||||||
| company_id | uuid | 2147483647 | null |
|
|
|||||||||||||||
| worker_id | uuid | 2147483647 | null |
|
|
|||||||||||||||
| title | varchar | 160 | null |
|
|
|||||||||||||||
| lifecycle_status | varchar | 20 | null |
|
|
|||||||||||||||
| priority | varchar | 20 | null |
|
|
|||||||||||||||
| workflow_catalog_version | varchar | 80 | null |
|
|
|||||||||||||||
| workflow_snapshot_json | text | 2147483647 | null |
|
|
|||||||||||||||
| created_by | uuid | 2147483647 | null |
|
|
|||||||||||||||
| created_at | timestamptz | 35,6 | null |
|
|
|||||||||||||||
| updated_at | timestamptz | 35,6 | null |
|
|
|||||||||||||||
| version | int8 | 19 | 0 |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_workflow_case | Primary key | Asc | case_id |
| idx_workflow_case_company_updated | Performance | Asc/Asc | company_id + updated_at |
| idx_workflow_case_company_worker | Performance | Asc/Asc | company_id + worker_id |
| uq_workflow_case_id_company | Must be unique | Asc/Asc | case_id + company_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ck_workflow_case_version | ((version >= 0)) |
| ck_workflow_case_title_not_blank | ((char_length(TRIM(BOTH FROM title)) > 0)) |
| ck_workflow_case_snapshot_not_blank | ((char_length(TRIM(BOTH FROM workflow_snapshot_json)) > 0)) |
| ck_workflow_case_updated_at | ((updated_at >= created_at)) |
| ck_workflow_case_priority | (((priority)::text = ANY ((ARRAY['URGENT'::character varying, 'HIGH'::character varying, 'NORMAL'::character varying, 'LOW'::character varying])::text[]))) |
| ck_workflow_case_catalog_version_not_blank | ((char_length(TRIM(BOTH FROM workflow_catalog_version)) > 0)) |
| ck_workflow_case_lifecycle_status | (((lifecycle_status)::text = ANY ((ARRAY['ACTIVE'::character varying, 'COMPLETED'::character varying, 'CANCELLED'::character varying])::text[]))) |



