Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| import_id | uuid | 2147483647 | null |
|
|
||||||||||||||||||
| company_id | uuid | 2147483647 | null |
|
|
||||||||||||||||||
| source_file_id | uuid | 2147483647 | null |
|
|
||||||||||||||||||
| created_by | uuid | 2147483647 | null |
|
|
||||||||||||||||||
| status | varchar | 30 | null |
|
|
||||||||||||||||||
| source_headers_json | text | 2147483647 | null |
|
|
||||||||||||||||||
| mapping_json | text | 2147483647 | null |
|
|
||||||||||||||||||
| create_idempotency_key_hash | varchar | 64 | null |
|
|
||||||||||||||||||
| create_request_hash | varchar | 64 | null |
|
|
||||||||||||||||||
| total_rows | int4 | 10 | 0 |
|
|
||||||||||||||||||
| valid_rows | int4 | 10 | 0 |
|
|
||||||||||||||||||
| invalid_rows | int4 | 10 | 0 |
|
|
||||||||||||||||||
| excluded_rows | int4 | 10 | 0 |
|
|
||||||||||||||||||
| committed_rows | int4 | 10 | 0 |
|
|
||||||||||||||||||
| source_file_expires_at | timestamptz | 35,6 | 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_worker_import_job | Primary key | Asc | import_id |
| idx_worker_import_job_company_updated | Performance | Asc/Desc/Asc | company_id + updated_at + import_id |
| uq_worker_import_job_create_key | Must be unique | Asc/Asc | company_id + create_idempotency_key_hash |
| uq_worker_import_job_id_company | Must be unique | Asc/Asc | import_id + company_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ck_worker_import_job_create_request_hash | ((char_length((create_request_hash)::text) = 64)) |
| ck_worker_import_job_create_key_hash | ((char_length((create_idempotency_key_hash)::text) = 64)) |
| ck_worker_import_job_version | ((version >= 0)) |
| ck_worker_import_job_status | (((status)::text = ANY ((ARRAY['UPLOADED'::character varying, 'MAPPED'::character varying, 'REVIEW_REQUIRED'::character varying, 'READY'::character varying, 'COMMITTED'::character varying])::text[]))) |
| ck_worker_import_job_time_order | (((updated_at >= created_at) AND (source_file_expires_at > created_at))) |
| ck_worker_import_job_counts | (((total_rows >= 0) AND (valid_rows >= 0) AND (invalid_rows >= 0) AND (excluded_rows >= 0) AND (committed_rows >= 0) AND ((((valid_rows + invalid_rows) + excluded_rows) + committed_rows) <= total_rows))) |



