If anyone wants to do this, here’s what worked for me. Open the rails console and run:
p = Post.find(31871)
u = User.find_by(username:"xxx")
PostActionCreator.create(u, p, :like, created_at: Time.now)
Obviously you will have to swap out the post id and the username