XF 1.0 Resetting user_id ??

steven s

Well-known member
In our test install we have deleted all posts and usernames.
Now when a new user is created the id is in the 4000s.

We kept the admin user id as 1.
Can I change the auto increment so the next user to register will be 2?

Same question for post_id, thread_id and whatever else I missed.
Currently I have no threads or forums.
 
Restarting the MySQL server should fix it, it's because the AUTO_INCREMENT automatically increments it from the ID that was last used (if I recall) and restarting the server should force it to AUTO_INCREMENT from the last ID stored in the database, not in memory.

Someone please correct me if I'm wrong :D
 
In our test install we have deleted all posts and usernames.
Now when a new user is created the id is in the 4000s.

We kept the admin user id as 1.
Can I change the auto increment so the next user to register will be 2?

Same question for post_id, thread_id and whatever else I missed.
Currently I have no threads or forums.

That is one of the reasons I recommend you do not build onto a test forum:

http://xenforo.com/community/threads/import-guide.10053/

Overall Approach For Importing

I recommend doing a test import first so you can work out any problems before going live. Once you are satisfied with the results then install another copy of xenForo and run the import again from scratch. Use the test forum as a point of reference when doing your final import, as opposed to building onto your test forum and taking it live. If you have done any custom development on the test forum (e.g. custom styles and addons) then you need to apply those changes to the "from scratch" copy of xenForo when doing the final import.

It is better to do the final import from scratch. The test forum won't contain new content that was added to your live forum since you ran the initial import, and there is no option to pull in only the new content. So you would have to run the entire import again and deal with duplicate content from the initial import.

By the way, how did you mass prune your users? There is no utility for that in the software so I am concerned that you tried to manually query the database which is a daunting task considering how many tables reference user_ids. You will end up having problems in the future with the old user_ids still floating around the database.

In short, don't try to do what you are doing. Install fresh and start over with your import.
 
By the way, how did you mass prune your users? There is no utility for that in the software so I am concerned that you tried to manually query the database which is a daunting task considering how many tables reference user_ids. You will end up having problems in the future with the old user_ids still floating around the database.

In short, don't try to do what you are doing. Install fresh and start over with your import.
Our developers removed the forums, posts and users.
I don't know how.
 
Top Bottom