How to process migrated content?

Hello,

I’m trying to import content into Discourse using /script/import_scripts/base.rb, and I found that after creating a post created_post(post) is called.

def created_post(post)
  # override if needed
end

That is very nice, because I can trigger some post-migration things.

Unfortunately you have it only for posts. Can I ask you to implement something similar for Users, Topics, Categories, etc?

I made a pull request here: Allow to process imported content. (add additional callbacks) by mrded · Pull Request #4515 · discourse/discourse · GitHub

Thanks.

3 Likes

Thanks, it’s merged.

2 Likes