Closed (fixed)
Project:
Mailhandler
Version:
7.x-2.x-dev
Component:
Mailhandler
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2012 at 20:33 UTC
Updated:
27 May 2012 at 16:40 UTC
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
Comment #1
danepowell commentedI 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
Comment #2
danepowell commentedThe 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.
Comment #3
danepowell commentedAlso: #1479414: hook_update_71** run on D6 to D7 upgrades
Comment #4
danepowell commentedFWIW, 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.
Comment #5
danepowell commentedOkay, I think this should be fixed now:
http://drupalcode.org/project/mailhandler.git/commit/37e2679