I’m not the project leader on this (officially, I retired in 2016, I’m just helping with the discussion forums migration because of my long experience with it), I’ll ask him if we can have that done as part of the data migration. Otherwise, I could probably do it via the API.
A one-to-one relationship between Discourse usernames and member IDs isn’t an absolute necessity, I was just wondering if there was a way to enforce one. I can use the data explorer tool to look for non-uniqueness once the field is populated.