PDA

View Full Version : Need help preparing for a clean import



Gary Fischman
Wed 4th May '05, 8:34am
I've spent a lot of time setting up my templates, building a test database with the functionality I need, etc. Now its time to purge the test db and import my UBB.

First thing I did was purge all users except myself.
Next, I deleted all the forums.

I figured I was ready to do the import, but I decided to poke around the database to make sure there were no artifacts of the test database.

However, I found that two tables appear to have not been cleaned up during the purge:

userfield and usertextfield each contain rows corresponding to users that are no longer in the user table. Also, since there are no longer any posts, I would expect that postindex would be empty. Is that an accurate assumption?

Questions:

What is the safest way to clean up the above tables prior to import?
Is there any other cleanup I need to do?
I see that the user table "next autoindex" is still set to the total number of users prior to purge. How should I change that so I can do a clean import? Should I just change the auto_increment value to 2 (since there is only 1 user - me)?
Any other prep work?


Thanks!

Steve Machol
Wed 4th May '05, 2:27pm
How did you remove the users? Those tables should have been updated when you did this.

Gary Fischman
Wed 4th May '05, 2:39pm
I used "prune" to get rid of the users. I suspect the entries in the table may be an artifact of an earlier failed import of UBB, however I can't be certain since I didn't check for it at the time.

Steve Machol
Wed 4th May '05, 2:46pm
Well you could manually remove all rows in the userfield and usertextfield tables except for the one that matches the one in your user table.

Jerry
Wed 4th May '05, 3:43pm
I would suggest using the "Database cleanup & restart" link at the top of every impex page.

Gary Fischman
Wed 4th May '05, 6:48pm
I would suggest using the "Database cleanup & restart" link at the top of every impex page.

That would only help after I run an import. I need to clean things up before running the import. So I guess my only option is to manually delete the rows from the two tables.

Any other thoughts on this?

BTW - I found several other tables that don't get cleaned up when users and forums are removed:

passwordhistory
pm, pmreceipt, pmtxt
subscribeevent
user_activation


There are probably others as well.

Steve Machol
Wed 4th May '05, 7:43pm
Jerry meant to run this before doing the import.

Gary Fischman
Wed 4th May '05, 7:45pm
Jerry meant to run this before doing the import.

Tried. It didn't do anything to those two tables. I decided to just delete all the rows other than 'userid'=1.

Gary Fischman
Wed 4th May '05, 8:00pm
Just tried a test import. When I was doing the threads, I got the following error, and the importer hung there.



forum_5.threads missing moving on
Fatal error: Cannot break/continue 1 level in /user/forum/www/vb/impex/systems/ubb_classic/006.php on line 229


What next?

Steve Machol
Wed 4th May '05, 8:02pm
It looks like bad data from UBB. Not sure what to do about this. Jerry will have to sort this one out.

Gary Fischman
Wed 4th May '05, 8:06pm
BTW - after the failure, I clicked on "Database Cleanup", and deleted the entire import. The userfield and usertextfield didn't get cleaned up. Gotta do 'em manually again.

Jerry
Wed 4th May '05, 9:01pm
Tried. It didn't do anything to those two tables. I decided to just delete all the rows other than 'userid'=1.

I miss read, I thought you were removing test import data. Running this against normal data will not clean it up as its not imported.


BTW - after the failure, I clicked on "Database Cleanup", and deleted the entire import. The userfield and usertextfield didn't get cleaned up. Gotta do 'em manually again.

I've tracked that down to a few versions of MySQL, and am looking at ways of sorting it.

Gary Fischman
Wed 4th May '05, 11:13pm
I miss read, I thought you were removing test import data. Running this against normal data will not clean it up as its not imported.



I've tracked that down to a few versions of MySQL, and am looking at ways of sorting it.

If it helps, I'm using MySQL 4.1.11.

Any idea about the fatal error above?

Jerry
Thu 5th May '05, 2:21pm
If it helps, I'm using MySQL 4.1.11.

Any idea about the fatal error above?

I've not come accross that fatal before as the continue; is there to take it out of a loop if there is no forum data, all I can suggest there is to comment out line 229 in that file, its a continue; call.

Gary Fischman
Thu 5th May '05, 7:44pm
Any diagnostics I can add to that line so we can see what's going on and why it terminates?

Jerry
Thu 5th May '05, 8:49pm
Change the continue; to a break; or just remove it would be the best bet.

What's happening its just checked if a thread that is listed in the threads file actually does exist and if it doesn't to skip to the next one.

You can just remove that and it *should* fail import the thread and move on to the next one.

I've found a lot of the files in ubb.classic imports can be out of sync on board that have been around a while or upgraded, things are still listed that aren't there etc.