We could refactor, and instead of 'movie_viewing_histories' we could use a 'visited_movies'  table belonging to both users and movies, with just  movie_id and user_id as columns.  It looks as though that was our original strategy, judging by the migration files.