• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Users Database help Retaining ID's

#1
I am fully expecting you guys to advise I just do a new import, however if any of you have a deeper understanding of the database I would really appreciate some pointers...

So when we finally migrate our forum, we want to keep the old forum live, and then just do a mini import of the (possibly few thousand) posts and users that have been created since importing.

I am testing around in a test environment and I have a script that will import threads and posts in the correct place, however, I am stuck with users.

My current thought process is this, I have site "A" which will be the live site when everything is said and done, then I have a sub site "B" which I can use to do new imports of data.

Let's say I have 100 users (I have more but its easier to just visualize) I do my import, everything gets copied over, in the time the import starts to end, a new user signs up, and, im retaining ID's, if I wasnt retaining ID's I could just do another import of data and import users...

So I dived into the database and saw that these tables are effected when importing users;
xf_user
xf_user_authentication
xf_user_ban
xf_user_change_log
xf_user_field
xf_user_field_value

So, my idea was, to truncate everything from site "A" in these tables, do a new import of site "B" but just for the users (users is one of the first options you can do) and then do an SQL script to copy everything from the above tables from "B"s database, and put it into A's, now ive dont this and the theory checks out, site A now has all of the users from site B, details and everything are correct, user groups, as they should be.

But it doesnt work, the users are displayed in the ACP, but when I click a user, rather than "edit" user, it shows "create" user but with all the correct information...
When I go to site B, where all of the information is being copied from that database it shows as "edit" user, as it should.

Is there a table ive missed, or something I am mis-understanding about how it manages/stores users?

The issue with retaining ID's is that the tables need to be completely empty before it can allow you to import, and of course you need to be logged in to use the ACP import, so I cant just delete all of the users, because I need a user account to login to the ACP - I hope that makes sense... I need a user account to login to ACP, but I cant have any users in the DB because of retaining ID's it needs to be empty.