Hi - We’ve got nearly 1 million votes in an old wp_commentsvote table from a previous plugin we ran before we switched to wpDiscuz some years back. (I looked at this a while back, but see you've updated your table structure)
We’d like to bring them over into wpDiscuz’s wp_wc_users_voted table, so we can drop the old table and slim down our database.
The following fields seem simple enough:
wp_wc_users_voted.comment_id = wp_commentsvote.commentID
wp_wc_users_voted.vote_type = wp_commentsvote.vote
wp_wc_users_voted.date = wp_commentsvote.voteTime
The ones that are a little more complex are user_id, is_guest and post_id. Can I check I’ve got the right understanding of those?
wp_wc_users_voted.user_id = wp_commentsvote.userID - unless it’s 0, in which case, is it as simple as using wp_commentsvote.ip? (btw - the data we have in wp_commentsvote is so old, there’s no IPv6 in there)
wp_wc_users_voted.is_guest = If (wp_commentsvote.userID = 0), they’re not logged in, so wp_wc_users_voted.is_guest should equal 1?
wp_wc_users_voted.post_id = This is going to have to be looked up in the wp_comments table to get the associated comment_post_ID, based on wp_wc_users_voted.comment_id?
Thanks in advance for your help.


