Project

General

Profile

« Previous | Next » 

Revision 6033

inputs/.NCBI/nodes/create.sql: Make name_txt (mostly) globally unique by removing several other kingdoms/superkingdoms, not just Animalia

View differences:

inputs/.NCBI/nodes/create.sql
16 16
ALTER TABLE :table ADD FOREIGN KEY ("parent tax_id") REFERENCES :table (tax_id)
17 17
    ON UPDATE CASCADE ON DELETE CASCADE;
18 18

  
19
-- Make genus (mostly) globally unique by removing other kingdoms
19
-- Make name_txt (mostly) globally unique by removing other kingdoms
20 20
-- Note that the delete will cascade to descendants
21
DELETE FROM :table WHERE tax_id = 33208; -- kingdom Animalia/Metazoa
21
DELETE FROM :table WHERE tax_id IN (
22
      10239 -- superkingdom Viruses
23
    , 12884 -- superkingdom Viroids
24
    , 12908 -- unclassified sequences
25
    , 28384 -- other sequences
26
    ,     2 -- superkingdom Bacteria
27
    ,  2157 -- superkingdom Archaea
28
    ,  4751 -- kingdom Fungi
29
    , 33208 -- kingdom Animalia/Metazoa
30
);
22 31

  
23 32
-- Make genus completely globally unique by removing duplicates
24 33
DELETE FROM :table

Also available in: Unified diff