-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
modules/cache_builder/db/version_1_15_0/201611121607_cache_occurrences_id_diff.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE cache_occurrences_functional ADD COLUMN identification_difficulty integer; | ||
|
||
COMMENT ON COLUMN cache_occurrences_functional.identification_difficulty IS | ||
'Identification difficulty assigned by the data_cleaner module, on a scale from 1 (easy) to 5 (difficult)'; |
8 changes: 8 additions & 0 deletions
8
modules/cache_builder/db/version_1_15_0/201611121607_cache_occurrences_id_diff_data.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- #slow script# | ||
|
||
update cache_occurrences_functional o | ||
set identification_difficulty=vrd.value::integer | ||
from verification_rule_data vrd | ||
join verification_rules vr on vr.id=vrd.verification_rule_id and vr.deleted=false | ||
and vr.test_type='IdentificationDifficulty' | ||
where vrd.header_name='Data' and upper(vrd.key)=o.taxa_taxon_list_external_key and vrd.deleted=false; |