fixing dependencies caused by changing a foreign key.