[Hippo-cms7-user] Writing updater modules

Jeroen Reijn j.reijn at onehippo.com
Tue Feb 23 16:42:01 CET 2010


As a side note. I just discovered that if I just add an extra 
hippo:version property with my own project version I can register my 
module on that version and only that version will be updated.

So I guess it's already possible to achieve this. Sorry for my noise.

Jeroen

Frank van Lankvelt wrote:
> Hi Jeroen,
> 
> good point, there is a mismatch between initialization and upgrade in 
> this respect.  You shouldn't have had to change the version number of 
> the base repository for an upgrade of project document types.
> 
> The solution would be to provide the hippo:version property in the 
> hippoecm-extension initialize folders.  And to then merge the version 
> numbers there with those in the /hippo:configuration/hippo:initialize 
> folder.  (so that initialization would truly be the merging of these 
> folders)  At the moment this merge is largely "by hand", i.e. the 
> initialize folder extension is extracted to a separate location and then 
> is merged by moving initialize items. 
>    See https://issues.onehippo.com/browse/HREPTWO-3780.
> 
> So we could do the merge of the version numbers like the merge of the 
> initialize items (i.e. explicit for the initialize folder type), but 
> this is really an(other) argument for a better merge! 
>  (https://issues.onehippo.com/browse/HREPTWO-2766)
> 
> cheers, Frank
> 
> On Tue, Feb 23, 2010 at 11:19 AM, Jeroen Reijn <j.reijn at onehippo.com 
> <mailto:j.reijn at onehippo.com>> wrote:
> 
>     Hi all,
> 
>     in my current project we're writing Updater modules for updating our
>     project from version A to version B when a content type has changed.
> 
>     We recently did an update from version 2.09.04 (noted as v20902 in
>     the /hippo:configuration/hippo:initialize) to our own version
>     number, which was set to our own end tag.
> 
>     Now when we want to update the CMS to the next major version, the
>     updater module coming with the CMS has a fixed start tag. For 7.3 it
>     apparently will be v20902, because that was the end tag for the 7.2
>     release. However our version has changed in the meantime and is now
>     let's say myprojectv1.
> 
>     So when deploying our new project version with an updated CMS 7.3
>     the updater modules for the CMS 7.3 version will not be triggered.
> 
>     Looking at the way the updater modules are written it's also not
>     easy to extend a different updater module and override the start tag
>     for a specific module.
> 
>     Of course you can manually change the version number before
>     updating, but that feels not kind of intuitive and can be lead to
>     errors.
> 
>     There probably are multiple solutions, but one of my suggestions
>     would be to add an extra property to the initialize node with for
>     instance project:version.
> 
>     That way you can keep the hippo version in sync with the updater
>     modules and the project updates can trigger based on the project
>     version.
> 
>     Of course this will not work if you would have multiple projects
>     into one repository. I'm just wondering what other people are
>     thinking about this. Please share your thoughts.
> 
>     Regards,
> 
>     Jeroen
> 
>     _______________________________________________
>     Hippo-cms7-user mailing list and forums
>     http://www.onehippo.org/cms7/support/community.html
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/community.html



More information about the Hippo-cms7-user mailing list