remove unneeded foreign key transformations