fixes migration foreign reference