Skip to content

Commit

Permalink
Merge branch 'hotfix-es_taxa' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvanbreda committed Oct 25, 2019
2 parents 5dcf657 + 20bf64b commit e07b3de
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
13 changes: 13 additions & 0 deletions reports/library/occurrences/list_for_elastic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
JOIN cache_samples_nonfunctional snf ON snf.id=o.sample_id
JOIN taxa_taxon_lists ttl ON ttl.id=o.taxa_taxon_list_id
JOIN taxa t ON t.id=ttl.taxon_id
LEFT JOIN cache_taxa_taxon_lists cttl ON cttl.id=o.taxa_taxon_list_id
LEFT JOIN locations l on l.id=o.location_id AND l.deleted=false
LEFT JOIN samples sp on sp.id=o.parent_sample_id AND sp.deleted=false
LEFT JOIN locations lp on lp.id=sp.location_id AND lp.deleted=false
Expand Down Expand Up @@ -178,5 +179,17 @@
<column name="occurrence_attrs_json" sql="onf.attrs_json" datatype="text" />
<column name="tracking" sql="o.tracking" datatype="integer" />
<column name="input_form" sql="o.input_form" datatype="text" />
<!-- Taxon info should get overwritten by master list data, but obtain default values to use just in case not
properly mapped -->
<column name="taxon_name" sql="cttl.taxon" datatype="text" />
<column name="taxon_authority" sql="cttl.authority" datatype="text" />
<column name="taxon_group_id" sql="cttl.taxon_group_id" datatype="integer" />
<column name="taxon_group" sql="cttl.taxon_group" datatype="text" />
<column name="common_name" sql="cttl.default_common_name" datatype="text" />
<column name="taxon_rank" sql="cttl.taxon_rank" datatype="text" />
<column name="taxon_rank_sort_order" sql="cttl.taxon_rank_sort_order" datatype="integer" />
<column name="taxon_kingdom" sql="cttl.kingdom_taxon" datatype="integer" />
<column name="taxon_order" sql="cttl.order_taxon" datatype="integer" />
<column name="taxon_family" sql="cttl.order_taxon" datatype="integer" />
</columns>
</report>
13 changes: 13 additions & 0 deletions reports/library/occurrences/list_for_elastic_all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
JOIN cache_samples_nonfunctional snf ON snf.id=o.sample_id
JOIN taxa_taxon_lists ttl ON ttl.id=o.taxa_taxon_list_id
JOIN taxa t ON t.id=ttl.taxon_id
LEFT JOIN cache_taxa_taxon_lists cttl ON cttl.id=o.taxa_taxon_list_id
LEFT JOIN locations l on l.id=o.location_id AND l.deleted=false
LEFT JOIN samples sp on sp.id=o.parent_sample_id AND sp.deleted=false
LEFT JOIN locations lp on lp.id=sp.location_id AND lp.deleted=false
Expand Down Expand Up @@ -177,5 +178,17 @@
<column name="occurrence_attrs_json" sql="onf.attrs_json" datatype="text" />
<column name="tracking" sql="o.tracking" datatype="integer" />
<column name="input_form" sql="o.input_form" datatype="text" />
<!-- Taxon info should get overwritten by master list data, but obtain default values to use just in case not
properly mapped -->
<column name="taxon_name" sql="cttl.taxon" datatype="text" />
<column name="taxon_authority" sql="cttl.authority" datatype="text" />
<column name="taxon_group_id" sql="cttl.taxon_group_id" datatype="integer" />
<column name="taxon_group" sql="cttl.taxon_group" datatype="text" />
<column name="common_name" sql="cttl.default_common_name" datatype="text" />
<column name="taxon_rank" sql="cttl.taxon_rank" datatype="text" />
<column name="taxon_rank_sort_order" sql="cttl.taxon_rank_sort_order" datatype="integer" />
<column name="taxon_kingdom" sql="cttl.kingdom_taxon" datatype="integer" />
<column name="taxon_order" sql="cttl.order_taxon" datatype="integer" />
<column name="taxon_family" sql="cttl.order_taxon" datatype="integer" />
</columns>
</report>
13 changes: 13 additions & 0 deletions reports/library/occurrences/list_for_elastic_sensitive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
JOIN cache_samples_nonfunctional snf ON snf.id=o.sample_id
JOIN taxa_taxon_lists ttl ON ttl.id=o.taxa_taxon_list_id
JOIN taxa t ON t.id=ttl.taxon_id
LEFT JOIN cache_taxa_taxon_lists cttl ON cttl.id=o.taxa_taxon_list_id
JOIN samples s on s.id=o.sample_id AND s.deleted=false
LEFT JOIN locations l ON l.id=s.location_id AND l.deleted=false
LEFT JOIN samples sp ON sp.id=s.parent_id AND sp.deleted=false
Expand Down Expand Up @@ -175,5 +176,17 @@
<column name="occurrence_attrs_json" sql="onf.attrs_json" datatype="text" />
<column name="tracking" sql="o.tracking" datatype="integer" />
<column name="input_form" sql="o.input_form" datatype="text" />
<!-- Taxon info should get overwritten by master list data, but obtain default values to use just in case not
properly mapped -->
<column name="taxon_name" sql="cttl.taxon" datatype="text" />
<column name="taxon_authority" sql="cttl.authority" datatype="text" />
<column name="taxon_group_id" sql="cttl.taxon_group_id" datatype="integer" />
<column name="taxon_group" sql="cttl.taxon_group" datatype="text" />
<column name="common_name" sql="cttl.default_common_name" datatype="text" />
<column name="taxon_rank" sql="cttl.taxon_rank" datatype="text" />
<column name="taxon_rank_sort_order" sql="cttl.taxon_rank_sort_order" datatype="integer" />
<column name="taxon_kingdom" sql="cttl.kingdom_taxon" datatype="integer" />
<column name="taxon_order" sql="cttl.order_taxon" datatype="integer" />
<column name="taxon_family" sql="cttl.order_taxon" datatype="integer" />
</columns>
</report>
13 changes: 13 additions & 0 deletions reports/library/occurrences/list_for_elastic_sensitive_all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
JOIN cache_samples_nonfunctional snf ON snf.id=o.sample_id
JOIN taxa_taxon_lists ttl ON ttl.id=o.taxa_taxon_list_id
JOIN taxa t ON t.id=ttl.taxon_id
LEFT JOIN cache_taxa_taxon_lists cttl ON cttl.id=o.taxa_taxon_list_id
JOIN samples s on s.id=o.sample_id AND s.deleted=false
LEFT JOIN locations l ON l.id=s.location_id AND l.deleted=false
LEFT JOIN samples sp ON sp.id=s.parent_id AND sp.deleted=false
Expand Down Expand Up @@ -174,5 +175,17 @@
<column name="occurrence_attrs_json" sql="onf.attrs_json" datatype="text" />
<column name="tracking" sql="o.tracking" datatype="integer" />
<column name="input_form" sql="o.input_form" datatype="text" />
<!-- Taxon info should get overwritten by master list data, but obtain default values to use just in case not
properly mapped -->
<column name="taxon_name" sql="cttl.taxon" datatype="text" />
<column name="taxon_authority" sql="cttl.authority" datatype="text" />
<column name="taxon_group_id" sql="cttl.taxon_group_id" datatype="integer" />
<column name="taxon_group" sql="cttl.taxon_group" datatype="text" />
<column name="common_name" sql="cttl.default_common_name" datatype="text" />
<column name="taxon_rank" sql="cttl.taxon_rank" datatype="text" />
<column name="taxon_rank_sort_order" sql="cttl.taxon_rank_sort_order" datatype="integer" />
<column name="taxon_kingdom" sql="cttl.kingdom_taxon" datatype="integer" />
<column name="taxon_order" sql="cttl.order_taxon" datatype="integer" />
<column name="taxon_family" sql="cttl.order_taxon" datatype="integer" />
</columns>
</report>

0 comments on commit e07b3de

Please sign in to comment.