Not sure what the general consensus will be on this idea, but...

Right now, updates for 4.7.x -> 5.x start with 1000, 5.x -> 6.x is 2000, etc. This is kind of hard to remember, and fairly unclear.

What if we renamed the updates (from 6.x on) to match the major version you are updating to? Then it's always clear what update corresponded to what version without reading the comments or doing (gasp!) MATH. ;)

Here's a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobRoy’s picture

Me likey. +1

Crell’s picture

+1 on concept. It's a good model for contrib to follow then, too. Are we sure that renumbering those now won't cause issues with sites that already ran those functions, or does that fall under the "devel breaks, deal" category? :-)

webchick’s picture

Yes, that falls under "devel breaks, deal" category, imo. :) Anyone who's using 6.x for anything more serious than a testbed at this point is playing with fire anyway.

chx’s picture

Next time do not let a maths freak like me introduce numbering. Thanks for fixing.

webernet’s picture

FileSize
2.57 KB

Rerolled for more updates (2005, 2006), and fix a typo in the final comment (6000 --> 7000).

kbahey’s picture

+1, for the sake of clarity.

dmitrig01’s picture

Status: Needs review » Reviewed & tested by the community
sun’s picture

Status: Reviewed & tested by the community » Needs work

@todo comment seems not appropriate here. IMHO, it could be removed since those numbers are intuitive now.

webernet’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
2.52 KB

You're right - rerolled without @todo

sun’s picture

*bump*

http://api.drupal.org/api/5/function/hook_update_N needs an update, too. I'd like to see this new numbering scheme used by contrib modules, too. Although I'd change the numbering scheme for contrib modules to:

512#
||||
|||└ Continuous counter, i.e. starting from '0'.
||└ Minor version number of this module, i.e. '2' for module version '1.2'.
|└ Major version number of this module, i.e. '1' for module version '1.2'.
└ Major version number of Drupal this module's release is compatible with.

IMHO a contrib module won't need more than 10 database updates within a minor version. However, if we want to allow more, we certainly can append another # and start counting from '01'.

Changing the numbering scheme for contrib modules allows new co-maintainers of a module to learn which updates were needed in the past and more importantly, for which version. You don't know that by looking at e.g. module_update_13.

Dries’s picture

Status: Reviewed & tested by the community » Needs work

This patch needs to be re-rolled/updated against HEAD it seems -- there are some updates missing.

webernet’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
2.91 KB

Rerolled with update 2007/6007.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to CVS HEAD.

sun’s picture

What about my proposal in #10? Shall I open another issue for that?

We encourage module maintainers to join forces with others, but the code of many contrib modules is in a out-dated state. So the rule to continuously count module updates beginning from 1 turns upgrading and co-maintaining of contrib modules into a pain.

Zen’s picture

Status: Fixed » Needs review
FileSize
702 bytes

Missed a spot.

Zen’s picture

FileSize
1.02 KB

And for 5...

I've also removed all the trailing comments which are irrelevant for the 5 branch.

-K

Crell’s picture

@sun: That's a documentation issue, so yes I'd say submit it as a new issue. That said, I like the idea of an established, good numbering standard. :-)

sun’s picture

Created an offshoot for the proposed numbering scheme of contrib modules: http://drupal.org/node/136078

dww’s picture

Status: Needs review » Reviewed & tested by the community

both #15 and #16 are RTBC. thanks, zen. i was worried at first by the comment for #16, since i thought you were proposing to re-number the 5.x updates to match the convention, too. luckily, you're just cleaning up some comments. phew! ;)

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)