Add rescue handling to allow migrations