adds generated fk(galleries,images)