[ZODB-Dev] Broken instances after refactoring in ZODB
Shane Hathaway
shane at hathawaymix.org
Fri Oct 3 16:24:07 EDT 2008
Marius Gedminas wrote:
> 1. create modules in their old locations that import all the classes
> from the new locations (and do nothing else).
> 2. write a script that opens the DB, iterates over all persistent
> objects in it, touches every single one of them (obj._p_activate()
> followed by obj._p_changed = True) and commits the transaction.
Marius said it correctly, but I'd like to emphasize that it's not enough
to touch just the objects whose class changed, since persistent
references encode the module and class name. It's best to just touch
everything. You will have to use multiple transactions to touch
everything in a large database.
Shane
More information about the ZODB-Dev
mailing list