Fix foreign table migrations