To answer my previous question for posterity, yes after removing duplicates and resetting the auto incremnt as described above and mismatch between the ids in instances and instance_id_mappings must be recitified:
UPDATE instance_id_mappings,instances SET instance_id_mappings.id=instances.id WHERE instances.uuid=instance_id_mappings.uuid and instance_id_mappings.id<>instances.id;
seems to me instance_id_mappings only contains duplicated information which can only lead ot suffering like this, guess I should go read the code and revision history if I want to see how this came to be.
To answer my previous question for posterity, yes after removing duplicates and resetting the auto incremnt as described above and mismatch between the ids in instances and instance_ id_mappings must be recitified:
UPDATE instance_ id_mappings, instances SET instance_ id_mappings. id=instances. id WHERE instances. uuid=instance_ id_mappings. uuid and instance_ id_mappings. id<>instances. id;
seems to me instance_ id_mappings only contains duplicated information which can only lead ot suffering like this, guess I should go read the code and revision history if I want to see how this came to be.