Project

General

Profile

« Previous | Next » 

Revision 11499

schemas/vegbien.sql: taxondetermination_set_iscurrent(): is_datasource_current: set to the same value as iscurrent, since these now have the same formula

View differences:

schemas/vegbien.sql
1375 1375
    UPDATE taxondetermination SET is_datasource_current = false
1376 1376
    WHERE taxonoccurrence_id = taxonoccurrence_id_ AND is_datasource_current;
1377 1377
    
1378
    UPDATE taxondetermination SET is_datasource_current = true
1379
    WHERE taxondetermination_id = (
1380
        SELECT taxondetermination_id FROM taxondetermination
1381
        WHERE taxonoccurrence_id = taxonoccurrence_id_
1382
        ORDER BY
1383
            isoriginal/*false first*/
1384
            , determinationdate DESC NULLS LAST
1385
        LIMIT 1
1386
    );
1378
    UPDATE taxondetermination SET is_datasource_current = true WHERE iscurrent;
1387 1379
END;
1388 1380
$$;
1389 1381

  

Also available in: Unified diff