I have a small doubt regarding zope3 generations.

In the current way of doing things:
- one should first put a dummy schema manager, restart the zope, so that a
generation 0 is assigned to the application.
- one should then put the actual site specific schema manager which would
use the evolution scripts from this point onwards in development.

I essentially have a web based application product and the users have no
idea of zope and python as such. The product is shipped to them,
the installer installs the whole zope 3 instances and services by itself and
starts them.

For the upgrade case, the installer (NSIS based) stops existing zope 3
services (Win32), replaces the software and then restarts the services.

Unfortunately, I didn't have setup the dummy schema manager in the earlier
version of the product.

Now that I need to send an upgrade, I am facing the dilemma of how to setup
the evolution scripts. As doing that would require doing more complicated
in the installer. (stop the services, put code for dummy schema manager,
start the services, ensure that database schema generation has  been setup
for the product,
stop the service again, put the new code and the regular schema manager,
start the service again).

This would complicate my installer a bit more. Its already quite

I don't know if this is quite a common use case scenario for zope based
applications. I am sure its not relevant for applications which are based on
a website and managed
by an expert, but for products with zope built-inside, may be this could be
of use.

As of now, I am thinking of a following solution. For the current upgrade, I
will have some code which will automatically evolve the existing
installation during startup
(i.e. DatabaseOpenedEvent) and actually assign a generation number in the
root[generations_key]['product_name'] key.

In the later upgrades, I will replace this with the regular schema manager.

Comments from the zope 3 experts would be very useful.

Thanks a lot.
With regards,
- Shailesh
Zope3-users mailing list

Reply via email to