joyent / conch-api

Datacenter build and management service
Mozilla Public License 2.0
22 stars 11 forks source link

copy_user_data does not handle new users #1080

Closed karenetheridge closed 3 years ago

karenetheridge commented 3 years ago

The copy_user_data command explodes when there are users created after the two databases deviated and they share the same email address: the "same" user was created in both environments, but of course the user_ids differ so the records cannot be copied without a conflict.

solve this by checking for duplicates and not copying over records that already exist with that email address in the target.