[ZODB-Dev] ZODB migration to Zope 2.8 (was: 0 is not really equal to my object)

Jim Fulton jim at zope.com
Fri Feb 11 07:28:43 EST 2005


Christian Heimes wrote:
...

> Is there another clean and nice way to migrate old databases with 
> pickles that point to non-existing classes because they were moved or 
> renamed?

No

 > I've used module aliases or sys.modules in the past but it is
> looking a little bit hacky to me.

It's the best we have right now.

Note, however, that it won't help with the uses of the ancient
obsolete BTrees.  They aren't the same as the new BTrees but in a different
location. They are actually totally differeent types with different
state formats.  The new BTree classes cannot deal with their state.

We'll have to look at creating aliases for ZODB.PersistentMapping
and ZODB.PersistentList.

I fear we'll have to write some sort of conversion script
to deal with converting old-style BTrees to new-style BTrees.

Another idea might be to define some sort of protocol
for dealing with unrecognized classes.  When the database
encounters a class it doesn't recognize, it could look in a table for
a handler.  That handler would be responsible for creating a new object.
Perhaps this could be combined with some sort of database conversion
process.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list