The last part of my testing, I need to import data from an old Community Server forum. The forum has been active for 9 years, and has about 46,000 posts.
I hope someone can point out the stored procedures or a script someone has already done to get me started to help with the migration. I will need to migrate the users, the forums and then the posts.
First what is the ProviderUserKey?
Second, can you describe how Flags are used? I think I can hard code it, but I am not sure yet.
Attached is the user upsert script I have so far. Let me know if you see anything stupid, (other than the upsert only doing insert, for now). Today is the first day I have had a change to look at either of these DBs.
The flags is used for the calculated field and I can hard code it to 2 (approved).
I will move forward and post an updated script once I have this done.
Note that I had defined a machine key in my old Community Server forum. I copied that and put it in my YAF config.
Also, the attached T-SQL script requires that it be run on SQL Server 2008 or newer. I used MERGE to OUTPUT a mapping table that is used in queries after the first merge, hence the 2008 or greater requirement.
I have run this and moved over a few thousand users and have not seen any problems with the site. If you see that I have missed an table or something, or have any suggestions, please let me know.
I am moving on to migrating the forums now.
Disclaimer: I had to get it done quick and it is a one shot deal, and I am not completed testing here, so there might be an error or three.
What I did:
Our database is about 1.3GB. It took about 10 minutes to move the data over.
I am brand new to YAF, so if any of you experts see anything I missed or could do better, please let me know. Thanks!
CS to YAF Migration.zip You have insufficient rights to see the content.
Users that are migrated over cannot log in. I have traced the code into YAF.Core > LoadPageFromDatabase.cs and have found that users that are migrated are not associated with any roles, thus do not have any permissions. If I try to work around this add a role to the user
RoleMembershipHelper.AddUserToRole( YafContext.Current.User.UserName, "Registered" );
they can see a page, but that causes other problems such as not being able to change their password.
What did I miss in the migration SQL?
I figured out the problem. The registered Role id was incorrectly hardcoded at the top of the migration SQL script.. 🤬
There are 37,467 posts in 9,720 topics in 17 forums.
We are working on cleaning up all of the old posts, but are doing it manually to make sure we don't delete any old gems.
I still have some minor issues to work out and some larger features to add, but YAFNET is so much better than our old community server forums.
Thanks to all of the devs for maintaining this project!