Updated code to migrate er site