# Migrar un foro de Kunena 3 a Discourse

**URL:** <https://meta.discourse.org/t/migrate-a-kunena-3-forum-to-discourse/43776>\
**Category:** Sysadmins\
**Tags:** how-to\
**Created:** [6 Mayo, 2016 05:25 UTC](https://meta.discourse.org/t/migrate-a-kunena-3-forum-to-discourse/43776 "2016-05-06T05:25:00Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![pgr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pgr/32/156783_2.png) [@pgr](https://meta.discourse.org/u/pgr)\
**Post date:** [3 Abril, 2018 13:17 UTC](https://meta.discourse.org/t/migrate-a-kunena-3-forum-to-discourse/43776/27 "2018-04-03T13:17:46Z")

</div>

Probably this part of `app/models/post_action.rb` to update counts:

```ruby
    when :like
      # 'like_score' is weighted higher for staff accounts
      score = PostAction.joins(:user)
        .where(post_id: post_id)
        .sum("CASE WHEN users.moderator OR users.admin THEN #{SiteSetting.staff_like_weight} ELSE 1 END")
      Post.where(id: post_id).update_all ["like_count = :count, like_score = :score", count: count, score: score]

```

and maybe I’ll try using this to actually do the “like” which is a kind of `PostAction`:

> <https://github.com/discourse/discourse/blob/main/script/import_scripts/lithium.rb#L380-L469>

This is my first time even looking at Ruby code… this will be fun…

---

_[View the full topic](https://meta.discourse.org/t/migrate-a-kunena-3-forum-to-discourse/43776)._
