Closed dimus closed 7 years ago
It is important to preserve taxon_id as a part of the key in name_strings, because some datasources have the same name strings with different taxon_ids and we are loosing this information without it. In old database we have correct composite key -- uniqueness is created from 3 fields here -- name string id, data source id and taxon id. Taxon id and local id might be the same, but might be different, so we need to preserve them both.
+---------------------------+----------------------------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------------+----------------------------------------------------+------+-----+---------+-------+
| data_source_id | int(11) | NO | PRI | NULL | |
| name_string_id | int(11) unsigned | NO | PRI | NULL | |
| taxon_id | varchar(255) | NO | PRI | | |
| global_id | varchar(255) | YES | | NULL | |
| url | varchar(255) | YES | | NULL | |
| rank | varchar(255) | YES | | NULL | |
| accepted_taxon_id | varchar(255) | YES | | NULL | |
| synonym | set('synonym','lexical','homotypic','heterotypic') | YES | MUL | NULL | |
| classification_path | text | YES | | NULL | |
| classification_path_ids | text | YES | | NULL | |
| created_at (DROP) | datetime | YES | | NULL | |
| updated_at (DROP) | datetime | YES | | NULL | |
| nomenclatural_code_id | int(11) | YES | | NULL | |
| local_id | varchar(255) | YES | | NULL | |
| classification_path_ranks | text | YES | | NULL | |
+---------------------------+----------------------------------------------------+------+-----+---------+-------+
We need following information in output by importing data from database.
We do need this information, but it will come from new scoring system, so it is a separate ticket.