Hi Sutharsan,
Today I was trying to upgrade to the newest version with the security fix. I noticed a new entry in the .install that I'd expect to get installed (i.e. update 6010.)
It would not show up in the Update.php list however.
The fact is that you created an update_6200() so now any update_61xx() is ignored (i.e. considered older.) This is really bad and I have no clue how to fix it because you'd need an update 6201() to reset the counter but then the system would want to re-run 6200 and 6201... So the only way I can think of is to create another module to do the clean up... Ouch! The problem with using updates in the 6200 level is that you'll prevent such updates from happening when people upgrade from 6.x-1.x to 6.x-2.x...
So... my take is to have a new module and an error message in the Report status screen saying that the update level is wrong and thus that you have to install that other module and then uninstall (or run an SQL command by hand, if you know what you're doing.)
I can write that module if you want. But I'd like to know how you think we can fix this problem.
Thank you.
Alexis Wilke
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 805804-3.patch | 441 bytes | Thomas_Zahreddin |
Comments
Comment #1
sutharsan commentedI thought the update system was smarter, but it is not. But the problem is not so big. update_6009 (and 6010) originate from this issue: http://drupal.org/node/767556 which is just about a schema mismatch not about malfunction. The easiest solution I see is to continue with update_620x in the 6.x-1.x branch and use a higher number range (i.e. 625x) for the 6.x-2.x branch. The update_6200 in the current 6.x-2.x branch should be repeated (and made conditional) as update_6250.
Comment #2
AlexisWilke commentedArgh! Yeah... That makes it complicated. It is definitively a good idea to not add new features in version 1.x! 8-)
As long as people do not absolutely need to run 6010, they will be okay. Otherwise, you can always force which update to run in the Update system.
We probably want to make note of that in 6.x-2.x too.
Thank you.
Alexis
Comment #3
Thomas_Zahreddin commentedas you know in version 1.2 and 1.3 (in case of updating form an realy old version) the simplenews_update_6010 and simplenews_update_6011 aren't executed, since they are after simplenews_update_6200 in the source code (http://drupal.org/node/804252).
The order is changed in the dev-Version, but for simplenews version 6.x-1.3 in the system table the schema_version is 6200 and simplenews_update_6010 and simplenews_update_6011 won't be excuted either.
the only solution is to update the numbers, see the attached patch.
Comment #4
miro_dietikerThomas, if we update this to a more recent number, many users will see errors (if the update was already executed).
So if we renumber the patch, we also should check if it already was executed (in a DB independent way).
I don't want to provide errors for regular updaters.
I hope you see a better way.
Comment #5
miro_dietikerThis is becoming ugly now.
There happened some mess with the 6200 number in 6--1(-1) already. In addition we already added some upgrade hooks to 6--2 branch.
I decided to fix 6--1 cleanly and break the upgrade for the -dev only users of the branch 6--2. While all upgrades will proceed cleanly starting from 6--1 -- if a user already used 6--2 branch he will see errors. However, they won't result in something broken. I can't fix the situation any better now.
Can someone please try a 6--1-1 install to 6--1-dev upgrade to and then 6--2-dev please (after the commit delay went into tar-gz or checkout the cvs version.) Sure it also would be of interest to know if this also works from 6--1-2 and 6--1-3.
Thanks for any inputs.
Comment #6
Thomas_Zahreddin commentedhi,
i tested 6.x-1.x-dev; 6.x-2.x-dev and HEAD from CVS a few hours ago (on request of miro_dietiker).
The actual versions work as expected.
No more schema errors.
Comment #7
miro_dietikerThank you, Thomas!
How about direct updates from the obsolete previous releases (6--1-1, 6--1-2, 6--1-3 directly)?
Just want to make sure all cases work cleanly in the current situation.
It is really needed to check this because those different cases are really different in how the schema looks like as a starting point. (And in addition we have moved updates around between versions.)
Comment #8
miro_dietikerOK tested upgrade cycles from 6--1 (6--1-1, 6--1-3) in deep detail and it seems all result in the same situation - which is generally fine.
However 6--2 still misses some updates in the schema after upgrade, namely: simplenews_snid_tid.timestamp and simplenews_snid_tid.source
I've updated the .install procedure once more. All resulting schemas for 6--2 should now exactly match the schema after a clean install. (However users already using 6--2-dev that upgraded should tell update.php to reexecute 6251 update to make the schema complete. We won't fix the errors in this situation because it was -dev only.)
Please test (again). ;-)
Comment #9
roball commentedI have updated Simplenews 6.x-2.x-dev from the 2010-Aug-07 to the 2010-Aug-22 snapshot and received the following error on the DB update (via 'drush updb'):
Comment #10
miro_dietikerSince the 6--2 updates where broken (and we never released 6--2 anyway) this is (again) by intention.
Your result is stable and clean however we don't have any (db independent) information available to check if the updates are needed or not from schema or DB layer...
So all that already run the 6--2-dev release will see those errors - which won't result in anything broken.
This was needed due to previously broken naming of updates and the fact that not all update sequences have been tested.
Note that as of e.g. Drupal core upgrade policy beta is guaranteed to be upgrade stable and nothing before (like alpha or dev). So we're at a very good level of quality to support upgrades in -dev (with only some error messages ;-) ).
nJoy
Comment #11
roball commentedYes, no problem here - it just works (T.M.)