# Problemi nel conteggio dei like per la migrazione da OSQA a Discourse

**URL:** <https://meta.discourse.org/t/issues-in-like-count-for-osqa-migration-to-discourse/94880>\
**Category:** Development\
**Created:** [16 Agosto 2018, 3:03pm UTC](https://meta.discourse.org/t/issues-in-like-count-for-osqa-migration-to-discourse/94880 "2018-08-16T15:03:20Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [21 Agosto 2018, 6:43pm UTC](https://meta.discourse.org/t/issues-in-like-count-for-osqa-migration-to-discourse/94880/12 "2018-08-21T18:43:25Z")

</div>

I recently did a likes-import directly in SQL, and updated counts successfully. If you want, I can share queries here, but since it’s a “worst-practice” doing it through the database, it didn’t think of sharing it with the Community. I will, if there is interest.

A trick that is useful even if you’re writing a proper Ruby importer is to run the server with a command like this

` bundle exec rails server --binding=0.0.0.0 | grep -i 'update\|insert'`

And then try the action (in this case, the “Like”) from the UI. You will see the SQL that Discourse is using to change tables. This will help you figure out the several things involved in the action.

---

_[View the full topic](https://meta.discourse.org/t/issues-in-like-count-for-osqa-migration-to-discourse/94880)._
