I\'m trying to write an sql query for an update_all migration. I Saw different way to achieve and I need to do something like this :
Post.joins(:messages).upd