There have been some issues surrounding the upgrade path for the image module from Drupal 5 to Drupal 6.
In order to successfully upgrade, you need to:
Prepare Your Drupal 5 Install
- backup your database
- upgrade to the latest image 5.x.-1.x module
- then upgrade to the latest image 5.x-2.x module
Upgrade to Drupal 6
- backup your database
- follow the Drupal 5 to Drupal 6 upgrade instructions
- upload and install the latest image 6.x-1.x version of the image module (or other appropriate release)
- run update.php
- that should do it
Why
The key here is a code structure change in the image module in version 2.x that is important to update prior to your upgrade to Drupal 6.
Note
At the moment, the image module is in alpha and you must always be careful when dealing with alpha code. The current alpha is fairly stable but you should always, always, test the module prior to using it on a live production site. If you have any problems, please document any errors you receive and review the open issues list for the image module. If you do not find any immediate solution, post a support request with as much description as possible.
References
http://drupal.org/node/219808#comment-811682
http://drupal.org/node/219808#comment-1011071
Comments
6.x straight update from 5.x-1
I found my self upgrading my drupal 5 site, with image module 5.x-1.x, to drupal 6 without knowing that I should have upgraded first the image module 5.x-1 to the 5.x-2 branch. However, I believe I managed to do the drupal 6 update by running these two mysql queries prior to run the drupal 6 update:
Note that the table names are not between brackets as I run these queries direct on mysql. Remember to add any prefix you have in your database configuration.
Also, the second query has a list of sizes ('_original', 'thumbnail', 'preview') which needs to be updated with the sizes you are using. In my case I had a custom one called 'petita' so my list of sizes really was ('_original', 'thumbnail', 'preview', 'petita').
Finally, these queries seemed to work but I haven't test everything yet on my site, so don't take risks and ALWAYS do backups before attempting any change on your database
---
Robert Garrigos
Professional site: http://garrigos.cat
Catalan Drupal Users Group: drupal.cat
Thanks
Thanks for this - I did exactly the same and was starting to do a minor panic altho I had the option of rolling back to the backup. It appears to have worked perfectly.
Yep, need to remember about the prefix too!
Update from 4.7 to 5
I wonder how to update this module from 4.7 to 5 it seems that the table is changed from files to image, but that's all that I can tell, Is anybody can help me with this?
Cleans up the files
It removes duplicates and non existent files.
Another thing the upgrade from 4.7 to 5 does is clean up the files.
The upgrade query takes a long time.
I altered the query with a LIMIT just to make sure it was working.
Still took a long time, but works.
Then I removed the LIMIT and ran it overnight, worked.
I found these pages helpful...
http://drupal.org/files/issues/image-issues-FAQ.txt
http://drupal.org/node/208785
Technical Architect : Philadelphia, PA