Changing a foreign key to the many-to-many field