Upgrade Blues!

I am in the process of a long and complicated repair of the web site MySQL database on a pre-prod Drupal VM server because when I attempted this Drupal 6 to 7 upgrade on the live site last year it all went wrong. I managed to get it back but unfortunately it has left a ‘legacy’ of a partly upgraded database that now, following common sense by using a pre-prod environment, won’t upgrade! I am having to invoke each error and write a back-out SQL command and add it to a rollback script and execute it so I can invoke the next error. I grindingly repetitive roundabout! I will post the resulting script here.

Basically this is the process documented here: https://drupal.org/node/570162 but… It all went horribly wrong at step 13! The update.php threw a SQL error and would not complete. After a few hours of investigation I find I am having to invoke each error and write a back-out SQL command and add it to a rollback script and execute it so I can invoke the next error. I grindingly repetitive roundabout!

I will post the resulting script here. After which I will test it on a VM of D6.29 and the latest C-N-U backup to make sure I get a repaired and upgradeable database.