I need to add in new data to a table. This table had a unique key on just "plant_id". Because that key is just an auto-generated number, I've made it a compound key so I can do some inserting of new data, using these fields:
plant_id, taxonomic_genus, scientific_name, infraspecific_epithet
Done like this:
TABLE tablename DROP UNIQUE KEY, ADD UNIQUE KEY (plant_id,taxonomic_genus,scientific_name,infraspecific_epithet)
then when I tested by inserting what I know is a duplicate entry, It didn't prevent the duplicate. I did it again to be sure, and got a third entry.
I'm stumped. This is exactly what every tutorial online says to do.
My insert was this:
INSERT IGNORE INTO tablename (taxonomic_phylum_divis, taxonomic_family, genus_hybrid_marker, taxonomic_genus, species_hybrid_marker, scientific_name, infraspecific_rank, infraspecific_epithet, author, taxonomic_domain, ipni, publication, publish_date) VALUES