Project

General

Profile

« Previous | Next » 

Revision 11501

schemas/vegbien.sql: taxondetermination_set_iscurrent(): isoriginal: make sure it is always either true or false, so that if the NOT NULL constraint on this is ever removed you don't end up with the incorrect sort order false, true, NULL (it should be false=NULL, true)

View differences:

schemas/vegbien.sql
1367 1367
        SELECT taxondetermination_id FROM taxondetermination
1368 1368
        WHERE taxonoccurrence_id = taxonoccurrence_id_
1369 1369
        ORDER BY
1370
              isoriginal/*false first*/
1370
              COALESCE(isoriginal, false)/*false first*/
1371 1371
            , determinationdate DESC NULLS LAST
1372 1372
        LIMIT 1
1373 1373
    );

Also available in: Unified diff