News:

Wondering if this will always be free?  See why free is better.

Main Menu

How to merge two SMF Forums?

Started by Hoshi, November 22, 2004, 12:39:17 PM

Previous topic - Next topic

SoLoGHoST

Quote from: perplexed on August 03, 2007, 01:39:37 PM
Quote from: Motoko-chan on December 16, 2006, 08:25:16 PM
Quick steps to manually merge forums:

Note: pick one forum as the forum to merge to. This is the destination forum. The forum you are merging in is the source forum.


  • Find the last ID for the users on the destination. Add 1 to it. Import the source users table, adding the number to all user IDs.
  • Find the last ID for the categories. Add 1 to it. Import the source categories table, adding the number to each category ID.
Now, the difficult stuff

  • Find the last ID for the boards. Add 1 to it. Keep this in mind.
  • Find the last ID for the topics. Add 1 to it. Keep this in mind.
  • Find the last ID for the posts. Add 1 to it. Keep this in mind.
  • Find the last ID for the members. Add 1 to it. Keep this in mind.
  • Find the last ID for the polls. Add 1 to it. Keep this in mind.
  • Import the boards table. Add the appropriate numbers for the board ID, first and last message ID, parent ID if not 0, and category ID.
  • Import the topics table. Add the appropriate numbers for the topic ID, board ID, message IDs, member IDs, and poll IDs.
  • Import the messages table. Add the appropriate numbers for the message IDs, topic ID, board ID, and member IDs.
  • Import the polls table. Add the appropriate numbers for the poll IDs and member IDs.
  • Import the poll choices table. Add the appropriate numbers for the poll IDs.
  • Import the messages table. Add the appropriate numbers for the message IDs, topic ID, board ID, and member IDs.
This will get most of the system working, but you'll still be missing personal messages, themes, posts being marked as read, non-post count member groups, special permissions, secondary groups, and probably a few other things I've forgotten.

And of course, this doesn't even take into account any collisions in users or whatnot.

Supposing the member details are the same for both forums - as one was a copy of the other long time ago for testing purposes.  So all we really want is to merge all the boards, posts, topics in one forum A  into the active forum B.  The members are the same.  PMs are saved and cleared out on A, all we really want is to have the boards and posts moved to the B forum and to show the correct members as having posted them.

Would that be simpler to do?  I don't know much about sql databases :(
Well, even in this case, you'd still want to keep all attachments right?  If so than a new file_hash will have to be created if their exists a file_hash within the other attachments table that matches any from the other table, than you'll have to copy over the files, renaming any that are duplicated, but remember this ties into the attachments table very tight.  Ofcourse, it's doable, but a huge headache to say the least.

I'm wondering, if passwords are stored in the database...  How will they manage to do passwords for users as well as username repetitions?  Perhaps it would be a good idea for something like this:  SoLoGHoST[1], SoLoGHoST[2].

Well, this is a nice project for sure, for the Dev who is doing this, should be interesting...

dakotaroar

When I did it, the username from the source board (the one being merged into another board) ended up looking like a Guest post (with the username as the name of the guest) rather than trying to merge users who existed in both boards.  Your mileage may vary--we didn't have a lot of overlap in usernames.
The only forum for students in North and South Dakota!  Campus Dakota.

NotNice

#62
all appeared to go well, except when I connected the forum with the new database all the old topics which I gave a new board-ID were scattered all over the other boards
The only two tables I tried to merge were smf_messages and smf_topics

I'll just go out and pick up my computer from under my window now and start all over again
first things first: find out if there are any more places where topics and messages are connected to boards...

edit 1:Hi, it worked out just great, all the old messages are back

changing the member-id in the message-board turned out a big pain so I took a short-cut though, the old members are the same as the new members and I set the member-id for the old forum on 0 as they do not need to change any ancient messages anyway and the name still shows up next to the post
they are already overjoyed that the old messages are back, so no harm there

the only problem I have now is that the posts being marked as read don't work, so nothing is read and thats rather messy and needs fixing

edit 2: it's fixed, I just did ran the maintenance-stuff from the administrator-part, repair tables, empty cache, that sort of things and all works great now

edit: forget about 'works great', it blew up
topics from the new forum disappeared, new messages were not visible and so on
I think I made some mistake in the id-message something somewhere so I still have a lot of work to do
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little.

NotNice

perhaps a silly quenstion, but the tables that are named smf_log_something, could they cause any problems?
I did not include them in the merge and I am searching for any possible cause for the things that went wrong
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little.

gsgear

Quote from: SlammedDime on May 25, 2010, 07:23:59 PM
One of our devs has started working on a script to take care of this... it's still in early alpha stages right now and has some bugs to work out, and of course I can't give a timeline, but keep your eyes peeled. :)

Any news on this?  ;D

RustyBarnacle

I was also wondering if that script is still in development?  I've been searching and saw it mentioned a couple times but only one link to:

http://resourcez.biz/index.php?action=tpmod;dl=item7

and it mentioned that the success rate on that link wasn't great.

RasmusDJ

Hi anything new on this?

I have a forum, that i have upgraded to 2.0 RC4 with post from 2003 - 2009 and then the host was lost with more. I started a new one up, and it has been running since. I would love to merge these two. Most of the users are the same.

Any good ideas?

Motorhed

Still wanting this, if anyone's taking notice.

I have three or four failed forums full of info that I want to merge into one big failed forum. :)

Advertisement: