Here is an amazon.install file for Drupal 4.7 to perform the changes between 4.6 and 4.7. I did this as a proof of concept when the Drupal's initial upgrade patch went through. It is not horribly well tested yet, but it should do the trick. I saw a request for this on the devel list, but I can't post there for some reason.

Hope it helps!

CommentFileSizeAuthor
amazon_1.install4.51 KBwebchick

Comments

Prometheus6’s picture

Okay, now that I'm working on 4.7 for real, can I ask what this is? I mean I get the idea but I have no idea what it works with. I haven't been paying attention recently...is this going to work with the regular upgrade script?

I have no problem supporting such a function if I have a way to test it. I was going to include an sql script to do this stuff anyway.

webchick’s picture

Yep, in Drupal 4.7 the update.php script works for modules as well. So what .install files will do is plug a drop-down on update.php for your module, so people can select from it as well. Then any changes that need to be made to the database schema can be placed in here. This is awesome because it means you can make incremental database changes to your modules between major Drupal versions, and just instruct people to run update.php.

To test, setup a Drupal 4.6 site with the 4.6 version of Amazon tools installed (or if you have an existing database, make a copy of it and use that). Update the files to their 4.7 versions, and run update.php. As long as this .install file is in the same folder as the rest of the Amazon tools, you should see a second drop-down for it as well as the normal one that always appears for Drupal. It will go through and make the database changes (in this case, lowercasing all the field names).

But do test it, because I have never actually used this module in any kind of production site, I just needed an example to test the update stuff with and "Amazon" is very near the top of the modules list. ;)

Prometheus6’s picture

Status: Needs review » Fixed

I tried one upgrade and saw no combo box for upgrading AAT, but the necessary changes to upgrade are all coded in there. Since it looks like it might be a while before the official 4.7 release I'm going to let it be for a while.

Prometheus6’s picture

Status: Fixed » Closed (fixed)