Hi Prashant,
For any kind of hard coding effort is required to restore them to new environment.
May be as a part of this migration project you may think to optimise the code so that in future such situations can be handled efficiently
Regards,
Deepak Kori