safe key migration