Fix revert of add_foreign_key