Revision 7371
Added by Aaron Marcuse-Kubitza almost 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1439 | 1439 |
determinationtype varchar(255), |
1440 | 1440 |
reference_id int(11), |
1441 | 1441 |
isoriginal int(1) DEFAULT false NOT NULL, |
1442 |
is_datasource_current int(1) DEFAULT false NOT NULL, |
|
1442 | 1443 |
iscurrent int(1) DEFAULT false NOT NULL, |
1443 | 1444 |
taxonfit varchar(255), |
1444 | 1445 |
taxonconfidence varchar(255), |
schemas/vegbien.sql | ||
---|---|---|
1107 | 1107 |
, determinationdate DESC NULLS LAST |
1108 | 1108 |
LIMIT 1 |
1109 | 1109 |
); |
1110 |
|
|
1111 |
UPDATE taxondetermination SET is_datasource_current = true |
|
1112 |
WHERE taxondetermination_id = ( |
|
1113 |
SELECT taxondetermination_id FROM taxondetermination |
|
1114 |
WHERE taxonoccurrence_id = taxonoccurrence_id_ |
|
1115 |
ORDER BY |
|
1116 |
isoriginal/*false first*/ |
|
1117 |
, determinationdate DESC NULLS LAST |
|
1118 |
LIMIT 1 |
|
1119 |
); |
|
1110 | 1120 |
END; |
1111 | 1121 |
$$; |
1112 | 1122 |
|
... | ... | |
2313 | 2323 |
determinationtype text, |
2314 | 2324 |
reference_id integer, |
2315 | 2325 |
isoriginal boolean DEFAULT false NOT NULL, |
2326 |
is_datasource_current boolean DEFAULT false NOT NULL, |
|
2316 | 2327 |
iscurrent boolean DEFAULT false NOT NULL, |
2317 | 2328 |
taxonfit text, |
2318 | 2329 |
taxonconfidence text, |
Also available in: Unified diff
schemas/vegbien.sql: taxondetermination: Added is_datasource_current, which is autopopulated to the most recent datasource-provided taxondetermination