Right now there's not a good upgrade path from 6.x-1.x or 6.x-2.x to 7.x-2.x. It's sort of a mess, since a lot of the updates are duplicated between 6.x-2.x and 7.x-2.x, meaning that if you are on the latest 6.x-2.x and upgrade to 7.x-2.x, all of the updates will be applied again (unnecessarily). Additionally, the upgrade logic will have to figure out whether people are coming from 6.x-1.x or 6.x-2.x. Ugh.

Comments

danepowell’s picture

I think the way that this needs to work is:
- Copy all 61* and 62* updates to mailhandler.install (7.x-2.x). This ensures that users coming from any 6.x release will be updated to the latest 6.x-1.x or 6.x-2.x schema before hitting 7.x-2.x.
- Write mailhandler_update_7200 and have it do a conversion from the latest 6.x-2.x to 7.x-2.0. Test whether upgrades from 6.x-1.x get 62* updates. If not, it will need to manually force these updates or implement a separate conversion from 6.x-1.x to 7.x-2.x.
- For the remaining 72* updates, include safeguards if possible to only apply those updates if necessary.

I'm not totally sure about the last two points. See http://drupal.org/node/1393082

danepowell’s picture

The forum post wasn't getting any traction so I opened a core issue: #1547590: hook_update_n for projects with multiple branches. Unfortunately that's not getting any attention either, so any solution to this might need to be a hack.

danepowell’s picture

danepowell’s picture

FWIW, the way that I confirmed that this is broken was to install Mailhandler 7.x-2.x, then manually edit the system table to set the Mailhandler schema version to 6210. If you then go to update.php, you'll see that it wants to run all of the 72** updates, which are of course mostly duplicates of 62** updates. So clearly there is something wrong with how the Drupal update process is designed or implemented.

danepowell’s picture

Status: Active » Fixed

Okay, I think this should be fixed now:
http://drupalcode.org/project/mailhandler.git/commit/37e2679

Status: Fixed » Closed (fixed)

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