Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Merging 2 Vanilla installations (databases) together?

edited September 2011 in Vanilla 2.0 - 2.8
I have an "old board" running vanilla (converted from a 3x vbulletin forum) and a new vanilla board I started from scratch that's taken off in popularity.

I wanted to merge the old posts and users from the "old board" into the new board I was wondering if anyone has any suggestions or knows where to start or about any potential pitfalls with trying this.

From the "old board" database I'm dropping the activity statements and user conversations (private messages) to make things simpler. Other small things todo would be change the user roles to the stock vanilla ones which is super simple.

From there it looks like a case of adding a base increment to CommentID DiscussionID, UserID and a few other fields before adding to the new existing database. Is that all there should be to it?


Thanks.


Tagged:

Answers

  • Options
    LincLinc Detroit Admin
    You may be able to use the standard VanillaPorter & import. I saw something in there about a "merge" import. I'd at least give it a look before you go crafting your own solution. Sorry I can't be more specific - bit tired :)
  • Options
    LincLinc Detroit Admin
    PS: Congrats on the new popular board. It's no small feat to start a new successful community.
  • Options
    UnderDogUnderDog MVP
    edited September 2011
    I wanted to merge the old posts and users from the "old board" into the new board I was wondering if anyone has any suggestions or knows where to start or about any potential pitfalls with trying this.
    I really hope you have a localhost install where you can do some tests on.
    Try the merge options first.
    Otherwise make 2 databases. new_board and old_board.
    Every data goes into new_board of course.

    Ok, I'm confused again.
    From there it looks like a case of adding a base increment to CommentID DiscussionID, UserID and a few other fields before adding to the new existing database.
    Can you explain a bit more what you mean?

    If the merge options don't work, here's some semi-code how I would do it.
    Add new temporary userstable to newboard Set auto increment value to (max real users table User ID +1) Insert into newboard Select fields, (<u>merge with other tables like if it was a list of discussions</u> merge with temp_users table instead of real users table) FROM oldboard Now you have your discussions (maybe duplicate) and comments PLUS users in a temp table (with very high user ID's but that's ok). The difficulty now is to find users in your temp_users table and see if they already have a record in the real_users table. Make a select and join on username. (maybe UPPERCASE(username) ) If you left join, you will see users WITHOUT record in the real_users table. If you inner join, you will see users with ONLY records in the real_users table. Update temp_users table and set the new user_id from the real users table. Insert into real_users SELECT from temp_users where user_id > (max real users table User ID +1)

    Duplicate comments and discussions can be merged using board functionality (since 2.0.18 beta)

    Hope it helps.

    There was an error rendering this rich post.

  • Options
    You may be able to use the standard VanillaPorter & import. I saw something in there about a "merge" import. I'd at least give it a look before you go crafting your own solution. Sorry I can't be more specific - bit tired :)

    I really hope you have a localhost install where you can do some tests on.
    Try the merge options first.
    Otherwise make 2 databases. new_board and old_board.
    Every data goes into new_board of course.

    Thanks for the tip guys, I am testing on a localhost but I don't know where to find any kind of merge option or function you are both referring to? I've looked through porter and can't find any sections about merging and when importing in the vanilla dashboard it is pretty clear that it will just overwrite the existing data with what you import.

    Ok, I'm confused again.
    Sorry this is hard to describe for me. In a nutshell the numbering and id of the users, discussions and comments of the old database and board aren't any different from the new board I want to add them to. So on import the existing data will just be overwritten. I was hoping if there was an easy way to change the id and numbering fields I could just merge them directly in mysql.

    If the merge options don't work, here's some semi-code how I would do it.
    Add new temporary userstable to newboard Set auto increment value to (max real users table User ID +1) Insert into newboard Select fields, (<u>merge with other tables like if it was a list of discussions</u> merge with temp_users table instead of real users table) FROM oldboard Now you have your discussions (maybe duplicate) and comments PLUS users in a temp table (with very high user ID's but that's ok). The difficulty now is to find users in your temp_users table and see if they already have a record in the real_users table. Make a select and join on username. (maybe UPPERCASE(username) ) If you left join, you will see users WITHOUT record in the real_users table. If you inner join, you will see users with ONLY records in the real_users table. Update temp_users table and set the new user_id from the real users table. Insert into real_users SELECT from temp_users where user_id > (max real users table User ID +1)

    Duplicate comments and discussions can be merged using board functionality (since 2.0.18 beta)

    Hope it helps.

    Actually yes it does help thank you very much. I guess I should point out I am still using 2.0.17.10. Are you referring to the new "Select the import source->This Database" thing in 2.0.18b2 ?
  • Options
    Are you referring to the new "Select the import source->This Database" thing in 2.0.18b2 ?
    Nope, I'm not referring to any version number. Let's just execute the merging steps and see what comes out of it.

    Changing the ID's in Users / Discussions / Comments table is such a hassle I wouldn't start on it.

    Have fun merging and post back if you need help.

    There was an error rendering this rich post.

Sign In or Register to comment.