Download & Extend

Option to purge or mass delete before importing

Project:vBulletin to Drupal
Version:5.x-1.1
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

For various reasons I had to do an import then do alot more development of other aspects of the site. So when I'm ready to go live, I'll have to get rid of the data and import again. (Also, to work on some of the conversion issues, I have to do some experimental imports to see what happens.)
So far, I've had no luck finding a way to do this mass delete (can't manually delete 25k records one at a time).

Someone suggested the Devel module using the generate option (w/"delete existing" first) but this is also not working for me (many errors and most of the content is still there).

So... sure would enhance this module if it had a "delete existing content before import" option! I'd need to do this to user accounts as well as all forums, posts and forum comments.

Comments

#1

Status:active» fixed

I've created a 'hidden' page to do this.

It's a simple solution: during the import, vB to Drupal takes ids from the vBulletin database and adds 1000,000 to them, so they don't conflict with any data already in Drupal. For example, a user with a user id of '3' in vBulletin will be imported to Drupal with a user id of 1000003. The delete function simply deletes all data with ids greater than 1000,000.

As this is so simple, it has the potential to delete other data unintentionally. So: if there's anything important on your test site, make sure it's backed up before running this! :)

The page is accessed by navigating to Administer -> Site building -> vB to Drupal, then by putting '/delete_import' on the end of the URL. Note: there is no confirmation, the delete function will start as soon as that page is accessed (although it will return an access denied error if you're not an admin). The URL should look something like: http://www.example.com/admin/build/vbtodrupal/delete_import

Also, to protect your site (just in case), the vB to Drupal module should be disabled. The vBpasswords module doesn't have the capability to delete lots of stuff, so it's safe to keep that enabled. :)

#2

Seems to be working for me. Thanks!

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.