Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||
---|---|---|---|---|---|---|---|---|---|---|
id | int8 | 19 | null |
|
|
|||||
accession_id | int8 | 19 | null |
|
|
|||||
date | date | 13 | null |
|
|
|||||
purpose_id | int4 | 10 | √ | null |
|
|
||||
destination | text | 2147483647 | √ | null |
|
|
||||
staff_responsible | text | 2147483647 | √ | null |
|
|
||||
created_time | timestamptz | 35,6 | null |
|
|
|||||
updated_time | timestamptz | 35,6 | null |
|
|
|||||
notes | text | 2147483647 | √ | null |
|
|
||||
viability_test_id | int8 | 19 | √ | null |
|
|
||||
withdrawn_grams | numeric | 131089 | √ | null |
|
|
||||
withdrawn_quantity | numeric | 131089 | √ | null |
|
|
||||
withdrawn_units_id | int4 | 10 | √ | null |
|
|
||||
estimated_count | int4 | 10 | √ | null |
|
|
||||
estimated_weight_quantity | numeric | 131089 | √ | null |
|
|
||||
estimated_weight_units_id | int4 | 10 | √ | null |
|
|
||||
created_by | int8 | 19 | √ | null |
|
|
||||
withdrawn_by | int8 | 19 | √ | null |
|
|
||||
batch_id | int8 | 19 | √ | null |
|
|
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
withdrawal_pkey | Primary key | Asc | id |
withdrawal__accession_id_ix | Performance | Asc | accession_id |
withdrawal__date_ix | Performance | Asc | date |
withdrawals_batch_id_idx | Performance | Asc | batch_id |
withdrawals_viability_test_id_unique | Must be unique | Asc | viability_test_id |
Check Constraints
Constraint Name | Constraint |
---|---|
estimated_weight_must_have_units | ((((estimated_weight_quantity IS NOT NULL) AND (estimated_weight_units_id IS NOT NULL)) OR ((estimated_weight_quantity IS NULL) AND (estimated_weight_units_id IS NULL)))) |
withdrawals_staff_responsible_check | ((staff_responsible !~ similar_to_escape(' *'::text))) |
withdrawals_viability_testing_has_test_id | ((((purpose_id <> 7) AND (viability_test_id IS NULL)) OR ((purpose_id = 7) AND (viability_test_id IS NOT NULL)))) |
withdrawals_notes_check | ((notes !~ similar_to_escape(' *'::text))) |
withdrawals_destination_check | ((destination !~ similar_to_escape(' *'::text))) |
withdrawals_test_id_requires_purpose | ((((viability_test_id IS NULL) AND ((purpose_id IS NULL) OR (purpose_id <> 7))) OR ((viability_test_id IS NOT NULL) AND (purpose_id IS NOT NULL) AND (purpose_id = 7)))) |