Hi.
I've prepared about 1500 topics (containg approx 25.000 posts) from an older forum to be inserted into an operating minibb forum. The userbase of the minibb forum already contains all the users of the older forum. The .sql files stand ready and are formatted according to the db shema described in _instal_mysql.sql. Except for two things: 1) the topic_id-s & the post_id-s, and 2) sorting: displaying existing topics BEFORE the inserted older ones.
1) As the new minibb forum already contains topics (about 200 topics, containing approx 2500 posts), the older topics and posts will need to be reindexed. The admin will freeze the new forum on the day of insertion, and pass me the first available topic_id and post_id. A sed script will then modify the .sql files rescpectively. For example, it there are 200 topics in the minibb forum, the first old topic will have topic_id of 201, the second 202 and so on..
Will such a scheme work? It should, from what I've seen in the db shema. I though of simply inserting the topics and posts without an id, so that the db would automatically assign it, but that would be too risky. The topics are in their own files, but the posts aren't (they're in the topic files). I would need to break the later one per file, sort them by post_id, and then insert them. Plus, each topic needs a last_post_id, bringing additional problems to the table.
--- 2) The second problem is sorting. I wish to convince minibb that the older topics are indeed older and should thus be displayed BELLOW the new topics, despite of having a higher topic_id. Is there a way to do this? Or do I need to go to the unfortunate task of SQL UPDATEing the topic_id's of existing minibb topics to be placed BEHIND the inserted old topics? That would brake bookmarks and other references to existing minibb topics .. not good.
Of course, there is a test system to try the thing first. We wont alter the producting environment until things are well checked-out, and even then we'll prepare a backup beforehand.
Thanks for the answers, -ike |