Re: Changing and migrating persistence structure
Hanno Schlichting <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Aug 8, 2010 at 2:21 PM, Martin Aspeli <[email protected]> wrote: > On 08/08/2010, Jim Fulton <[email protected]> wrote: >> On Thu, Aug 5, 2010 at 2:36 AM, Martin Aspeli <[email protected]> >> wrote: >>> What is the best way to manage this type of migration? >> >> Today, it probably makes the most sense to make new classes for the >> non-persistemnt objects. You'll then need to write a script to >> rebuild the data structures. > > Okay. So there's no way to get at the data if I take Persistent out of > the base classes for Records / Record. There should be some way of doing this with custom __getstate__ and __setstate__ methods. It's just tricky to get right and a bit fragile. It's much easier to write the migration code if both the old and new class are separate and functioning at the same time. Hanno _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )