# Importing from Vanilla, need assistance for Likes

**URL:** https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582
**Category:** Migration
**Tags:** vanilla
**Created:** [7 באוקטובר,‏ 2017,‏ 1:19pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582 "2017-10-07T13:19:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![igot2b](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/igot2b/32/79620_2.png) [@igot2b](https://meta.discourse.org/u/igot2b)
#### Post date: [7 באוקטובר,‏ 2017,‏ 1:19pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582/1 "2017-10-07T13:19:25Z")

</div>

Hello Discourse Community!

I’ve been playing around with migrating from Vanilla. I imported via the Vanilla import script and everything went fine so far.

> [@Migrate a Vanilla forum to Discourse](https://meta.discourse.org/t/how-to-migrate-from-vanilla-to-discourse/27273):
>
> I know there are a lot of posts about importing contents from a vanilla forum, but theres a lack of comprehensive guide! Not everyone can afford to hire a developer to migrate their forums and this is my way of giving back to this community smile So here it goes: You Need: Terminal (if mac) or alternative for windows A mind strong enough to understand and follow this guide! Patience A cup of coffee Step 1: Getting the Importer file! Use this addon to get the porter file: [Vanilla Porter A…](http://vanillaforums.org/addon/porter-core)

Now I’m stuck and ask for your input.

I’ve been using the “Kudos” plugin in Vanilla to provide users the ability to like posts. Now I want to migrate these likes to discourse too. I found the following useful information:

> [@Some questions on vbulletin import script (groups, likes, attachments)](https://meta.discourse.org/t/some-questions-on-vbulletin-import-script-groups-likes-attachments/37990/2):
>
> You’ll need to create records in the post\_actions table. Here’s the columns you need to know: id serial primary key post\_id integer fkey posts user\_id integer fkey users post\_action\_type\_id integer ; like = 2 deleted\_at timestamp null created\_at timestamp updated\_at timestamp deleted\_by\_id integer null, fkey users

I was already able to convert the data from MySQL and make it compatible with the “post\_actions” table in PostgreSQL, matching the post IDs and user IDs to the new IDs and so on.

My problem:

- I inserted one line into the post\_actions table in the discourse database
- The like would not show up when viewing the corresponding post in discourse
- I then liked the post within discourse and the (now) two likes showed up
  - When checking the coresponding user I importet the like for, no likes where shown in the user profile
  - I don’t want to manually like every post so likes show up when viewing the post

My Questions:

- Is there a recommended way to import likes from another source?
- Is there a way to tell discourse to go through the post\_actions table and do all the necessary actions?
  - Update posts
  - Update users
  - Update history or whatever else may be needed

Thanks if you followed so far and thank you in advance for your comment. If any furher information is needed please go ahead and ask straight away!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [7 באוקטובר,‏ 2017,‏ 1:32pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582/2 "2017-10-07T13:32:16Z")

</div>

Search the existing importers for ‘like’ and see if there are examples.

---

<div class="post-metadata">

### Author: ![igot2b](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/igot2b/32/79620_2.png) [@igot2b](https://meta.discourse.org/u/igot2b)
#### Post date: [7 באוקטובר,‏ 2017,‏ 1:43pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582/3 "2017-10-07T13:43:49Z")

</div>

Thank you very much for the quick response!  
I found a whole function in /var/www/discourse/script/import\_scripts/lithium.rb. I will try adapting that to my needs.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [3 בנובמבר,‏ 2019,‏ 10:11pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582/4 "2019-11-03T22:11:43Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [22 ביולי,‏ 2023,‏ 9:26pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582/5 "2023-07-22T21:26:48Z")

</div>



---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [22 ביולי,‏ 2023,‏ 10:20pm UTC](https://meta.discourse.org/t/importing-from-vanilla-need-assistance-for-likes/71582/6 "2023-07-22T22:20:54Z")

</div>


