Cbb Reaction doubt


User avatar
Leinad4Mind
 
Posts: 213
Joined: Thu Oct 15, 2015 10:10 pm
 Fri Apr 01, 2022 10:33 pm • via Web
Is it possible to migrate from BBreaction to cbb reaction?

EDIT: I would prefer if we could add multiple reactions as on Discord. But great work, looks amazing
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Sat Apr 02, 2022 9:15 am • via Web
Leinad4Mind wrote:Is it possible to migrate from BBreaction to cbb reaction?

I have to look at it, although I find it difficult. They are quite different extensions.

Leinad4Mind wrote:EDIT: I would prefer if we could add multiple reactions as on Discord. But great work, looks amazing

I will keep it in mind for future versions
User avatar
Leinad4Mind
 
Posts: 213
Joined: Thu Oct 15, 2015 10:10 pm
 Fri May 27, 2022 4:23 pm • via Web
I dont mind to get my hands dirty if needed to run some sql queries manually for the migration
User avatar
Leinad4Mind
 
Posts: 213
Joined: Thu Oct 15, 2015 10:10 pm
 Sat May 28, 2022 6:04 pm • via Web
For what I saw, and to help you out too:

BBReaction
Image

cBBReaction
Image

So...
reaction_id -> like_type
post_id -> post_id
user_id -> user_id
username -> Well need to grab from user table by the user_id
reaction_time -> like_time

like_id is the primary key and auto increment, so we can ignore it.

So maybe this would work (tested, it seems to work, but would be great if you could double check, since I may be forgetting something):
Code: Select all
INSERT INTO phpbb_reactions_data (reaction_id, post_id, user_id, username, reaction_time)
   SELECT r.like_type, r.post_id, r.user_id, u.username, r.like_time
   FROM phpbb_reward r, phpbb_users u, phpbb_posts p
   WHERE r.user_id = u.user_id and r.post_id = p.post_id


[s]I just dont know how I can map the like_type to the reaction_id. Let say I want to map like_type 1 to reaction_id 2? How can I create an sql with that kind of mapping?[/s]

EDIT: Ok, I'll first make the reactions table be exaclty as the bbreaction one, so then I'll not have any trouble about mapping. (Would be a pain in the ass to run sql queries to match each one lol)

Who is online

Users browsing this forum: No registered users and 0 guests