Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int8 | 19 | √ | null |
|
|
|||||||||||||||||||||||||||||
| facility_id | int8 | 19 | null |
|
|
||||||||||||||||||||||||||||||
| number | text | 2147483647 | √ | null |
|
|
Displayed as the accession number to the user. |
||||||||||||||||||||||||||||
| collected_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||
| received_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||
| state_id | int4 | 10 | null |
|
|
||||||||||||||||||||||||||||||
| founder_id | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| trees_collected_from | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| subset_weight | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| subset_count | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| est_seed_count | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| drying_end_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||
| processing_notes | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| sub_location_id | int8 | 19 | √ | null |
|
|
|||||||||||||||||||||||||||||
| created_time | timestamptz | 35,6 | null |
|
|
||||||||||||||||||||||||||||||
| collection_site_name | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| collection_site_landowner | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| total_viability_percent | int4 | 10 | √ | null |
|
|
Percentage of viable seeds across all tests. |
||||||||||||||||||||||||||||
| remaining_grams | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| remaining_quantity | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| remaining_units_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| subset_weight_grams | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| subset_weight_quantity | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| subset_weight_units_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| modified_time | timestamptz | 35,6 | now() |
|
|
||||||||||||||||||||||||||||||
| created_by | int8 | 19 | null |
|
|
||||||||||||||||||||||||||||||
| modified_by | int8 | 19 | null |
|
|
||||||||||||||||||||||||||||||
| species_id | int8 | 19 | √ | null |
|
|
|||||||||||||||||||||||||||||
| collection_site_city | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| collection_site_country_code | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| collection_site_country_subdivision | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| collection_site_notes | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||
| collection_source_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| data_source_id | int4 | 10 | null |
|
|
||||||||||||||||||||||||||||||
| latest_observed_quantity | numeric | 0 | √ | null |
|
|
Most recent remaining quantity as observed by the user. |
||||||||||||||||||||||||||||
| latest_observed_units_id | int4 | 10 | √ | null |
|
|
Measurement units of |
||||||||||||||||||||||||||||
| latest_observed_time | timestamptz | 35,6 | √ | null |
|
|
Time of most recent change to observed quantity. |
||||||||||||||||||||||||||||
| est_weight_grams | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| est_weight_quantity | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| est_weight_units_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||
| total_withdrawn_count | int4 | 10 | √ | null |
|
|
Total number of seeds withdrawn. May be an estimate if withdrawals were measured by weight. |
||||||||||||||||||||||||||||
| total_withdrawn_weight_grams | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
| total_withdrawn_weight_quantity | numeric | 0 | √ | null |
|
|
Total weight of seeds withdrawn. May be an estimate if withdrawals were measured by seed count. |
||||||||||||||||||||||||||||
| total_withdrawn_weight_units_id | int4 | 10 | √ | null |
|
|
Measurement units of |
||||||||||||||||||||||||||||
| project_id | int8 | 19 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| accession_pkey | Primary key | Asc | id |
| accession__number_trgm | Performance | Asc | number |
| accession__received_date_ix | Performance | Asc | received_date |
| accession_created_time_idx | Performance | Asc | created_time |
| accession_number_facility_unique | Must be unique | Asc/Asc | number + facility_id |
| accessions__facility_id_ix | Performance | Asc | facility_id |
| accessions__species_id_ix | Performance | Asc | species_id |
| accessions_project_id_idx | Performance | Asc | project_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| accessions_collection_site_name_check | (collection_site_name !~ similar_to_escape(' *'::text)) |
| subset_weight_quantity_must_have_units | (((subset_weight_quantity IS NOT NULL) AND (subset_weight_units_id IS NOT NULL)) OR ((subset_weight_quantity IS NULL) AND (subset_weight_units_id IS NULL))) |
| accessions_collection_site_city_check | (collection_site_city !~ similar_to_escape(' *'::text)) |
| accessions_number_check | (number !~ similar_to_escape(' *'::text)) |
| subset_weight_units_must_not_be_seeds | ((subset_weight_units_id <> 1) OR (subset_weight_units_id IS NULL)) |
| accessions_collection_site_country_code_check | (collection_site_country_code !~ similar_to_escape(' *'::text)) |
| remaining_quantity_must_have_units | (((remaining_quantity IS NOT NULL) AND (remaining_units_id IS NOT NULL)) OR ((remaining_quantity IS NULL) AND (remaining_units_id IS NULL))) |
| accessions_founder_id_check | (founder_id !~ similar_to_escape(' *'::text)) |
| accessions_collection_site_landowner_check | (collection_site_landowner !~ similar_to_escape(' *'::text)) |
| accessions_collection_site_country_subdivision_check | (collection_site_country_subdivision !~ similar_to_escape(' *'::text)) |
| accessions_collection_site_notes_check | (collection_site_notes !~ similar_to_escape(' *'::text)) |
| observed_quantity_must_have_time | (((latest_observed_quantity IS NOT NULL) AND (latest_observed_time IS NOT NULL)) OR ((latest_observed_quantity IS NULL) AND (latest_observed_time IS NULL))) |
| accessions_processing_notes_check | (processing_notes !~ similar_to_escape(' *'::text)) |
| observed_quantity_must_have_units | (((latest_observed_quantity IS NOT NULL) AND (latest_observed_units_id IS NOT NULL)) OR ((latest_observed_quantity IS NULL) AND (latest_observed_units_id IS NULL))) |