Revision 6032
Added by Aaron Marcuse-Kubitza almost 12 years ago
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 kingdom Animalia/Metazoa |
|
20 |
DELETE FROM :table WHERE tax_id = 33208; -- delete cascades to descendants |
|
19 |
-- Make genus (mostly) globally unique by removing other kingdoms |
|
20 |
-- Note that the delete will cascade to descendants |
|
21 |
DELETE FROM :table WHERE tax_id = 33208; -- kingdom Animalia/Metazoa |
|
21 | 22 |
|
22 | 23 |
-- Make genus completely globally unique by removing duplicates |
23 | 24 |
DELETE FROM :table |
Also available in: Unified diff
inputs/.NCBI/nodes/create.sql: Making genus globally unique: Moved comment with kingdom name to line with DELETE, and put "delete cascades to descendants" comment on its own line