[Zope-CMF] Best use of source numbers in GS upgrade steps?

Wichert Akkerman wichert at wiggy.net
Fri Apr 17 03:18:29 EDT 2009


Previously Rob Miller wrote:
> Maurits van Rees wrote:
> > Hi,
> > 
> > I wonder what the best way is of specifying the source number of a
> > GenericSetup upgrade step.
> > 
> <---SNIP a bunch of stuff about how using versions to mark GS upgrade steps is 
> annoying--->
> 
> yes, as you discovered, using source and destination versions to mark when 
> upgrade steps should be run can be a bit janky.  i realized this when i first 
> ported the upgrade stuff over from CPS, but i wasn't quite sure how else to 
> handle it.
> 
> thinking about it now, though, i'd say perhaps the zcml should support only 
> including a "source" version, with the setup tool persisting the id of each 
> upgrade step when it is run.  then the UI would show an upgrade step as 
> needing to be run if a) the loaded profile version is greater than the source 
> version specified in the ZCML and b) the id of the upgrade step is not yet 
> stored in the setup tool's list of completed steps.

-1

This is a radical change in behaviour, and I'm not convinced it is
better. There may be good reasons to skip certain upgrade steps when you
move from one source to another, which is no longer possible with your
proposal.

Wichert.

-- 
Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.


More information about the Zope-CMF mailing list