<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On 16.11.2007, at 13:56, Shailesh Kumar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div> </div><div>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</div><div>(i.e. DatabaseOpenedEvent) and actually assign a generation number in the root[generations_key]['product_name'] key.</div><div> </div><div>In the later upgrades, I will replace this with the regular schema manager.</div><div> </div><div>Comments from the zope 3 experts would be very useful.</div></span></blockquote><br></div><div>well this is a real flaw with generations ...</div><div><br class="webkit-block-placeholder"></div><div>in our projects we always add an initial .generations package to avoid such cases, you  can do this too, but it needs an intermediate version but no "dummy" schema manager.</div><div><br class="webkit-block-placeholder"></div><div>in generations/__init__.py you add</div><div><br class="webkit-block-placeholder"></div><div><div>from zope.app.generations.generations import SchemaManager</div><div><br class="webkit-block-placeholder"></div><div>pkg = 'myapp'</div><div><br class="webkit-block-placeholder"></div><div>schemaManager = SchemaManager(</div><div>    minimum_generation=0,</div><div>    generation=0,</div><div>    package_name=pkg)</div><br class="webkit-block-placeholder"></div><div>and register the manager.</div><div><br class="webkit-block-placeholder"></div><div>make a realease, this will set the generation to 0</div><div><br class="webkit-block-placeholder"></div><div>then add your first "evolve1.py" to generations, the manager stays the same  - you only have to increase the generation number</div><div><br class="webkit-block-placeholder"></div><div>regards, bernd</div><div><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div></div><div><br class="webkit-block-placeholder"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>