How to call a module upgrade script

Hi,

For a module I'm working on, I need to call some Oscript to move some opentext.ini settings into KINI. I was under the impression that DoSubclassUpgrade() was the feature of my Module object I need to orphan, but I don't ever see it get called. Further, unlike other modules, I don't see the Configure script ever being called. Assuming that I added a DoSubclassUpgrade() to the new version of my module, are there any other steps I need to do in order that it get called? For that matter, is this called on the old module or the new module? Is there a better way to get some upgrade changes initiated?

Thanks in advance

-Hugh

Comments

  • I found part of my answer. It is very unfortunate but although the DoSubclassUpgrade() does get executed on the module upgrade, it gets run before the new module is applied. That means that you simply cannot add a new script to your module to be run on upgrade - it only runs the upgrade script on the old version of the module.

    I'm now thinking that I have to do a one-time setup script and have it run in module startup. That means on each startup, I need to check if my changes have been applied and if not, apply them. When you have multiple servers all trying to start up, there is a possible race condition to watch out for.

    -Hugh