You are here

Upgrading Drupal 4.6 to 4.7.3


My site was originally implement with a 4.6 version of Drupal so months later after I'd installed 5 or so other site with the new 4.7.3 version I thought it would be nice to upgrade. Nice thought but in reality when I ran the upgrade script and watched the video too (thanks lullabot.com see the video here) all was not well. I ended up with a shite load of errors and images missing. Having recently coded some php to dump pages into drupal from sql text files I took it on as a little project and here is my experience. I do have the php code for those who wish - I'm a horrible coder so email me if you wish to look at this dogs breakfast! These are just my notes and you've probably have to of gotten your hands quite durty in the past to know what the hell I'm talking about here.

My notes

My code basically dumped all the data from the old drupal install into sql formatted text files that could be pasted into Phpmyadmin. I ran into a few problems, don't forget to convert single quotes to double and also some weird characters were in the old database as well. Don't forget ticks being used in SQL statement compared to just regular single quotations.

I executed my php code and manually cut and pasted the queries into PhpMyadmin. Had to remove some duplicates and forgot about some tables. A big change was that the old node table has now been split in two, with a new table node_revisions having been created. Here is a list of the ones I grabbed. You can see what tables your 4.6 install or earlier uses by jusy look for the ones that are not empty. Table I used in upgrade and my code converted:

node
node_revisions
term_node
term_data
files
file_revisions

The following were done manually, basically a hack job because categories were not working as well as

comment table
url_alias
term_hierarchy
vocabulary
vocabulary_node_types

A huge problem was when I added new content the system did know what Node ID to choose so you gotta modd the sequences table too, make sure the values are greater than those you just dumped from the old install! e.g if you just added content and say your last record had a NID (node id) of 100 then change node_nid in the sequences table to 101. You'll need to change other variable in this table too.

sequences

Remember inline is fussy about dimensions of images

Summary

It's done but shite, what a mess and I just hope the upgrade from 4.7.3 to 5.0 is easier! I don't know an easier way of upgrading as it seems my 4.6 was some kind of developer build or something, perhaps I should of tried to upgrade to 4.7 first then to 4.7.3 ??? It helps to have your added on modules in a contrib directory. I strongly suggest that you watch the upgrade video as it has some nice tips on backing up all your drupal shite before you go a messing with it.

Tech: